PHP Classes

Laravel Helpers: Database access helpers using Laravel Eloquent

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 72 All time: 10,234 This week: 455Up
Version License PHP version Categories
helpers 1.0.0MIT/X Consortium ...7PHP 5, Databases, Libraries, Data types
Description 

Author

This package provides database access helpers using Laravel Eloquent.

It provides several helper functions that perform several tasks accessing databases and managing data like parsing a SQL query, creating a PDO factory, run a PDO query statement and check of a database exists.

The package also provides a class for managing collections of object properties and invoking a callback function on all of them.

Picture of Kevinralph M Tenorio
  Performance   Level  
Name: Kevinralph M Tenorio <contact>
Classes: 5 packages by
Country: Philippines Philippines
Age: 39
All time rank: 337525 in Philippines Philippines
Week rank: 259 Up1 in Philippines Philippines Up
Innovation award
Innovation award
Nominee: 3x

Example

<?php

// This is Laravel Helper Class..
//
// READ ME:
//
// Created this prop, just because, Laravel collection errors incase a direct
// access to its members fails. using `prop` it will just return `null` incase
// a member of the collection does not exists, and if accessing it as a method
// you can convert its value as a proper type, like `float, int, integer, boolean,
// dateTime, string, array, object, double` this can easily be extended by
// adding / modifying the a function in `ObjectPropDataType::checkCustomType`
// its not as best implementation but you got the picture.
//

// Sample simple Usage:
$user = prop(User::find(1));

// Shows raw value; string
dd($x->created_at);

// Shows value with DateTime DataType
dd($x->created_at()->toDateTime());

// Accessing meta or if using 'laravel-metable'
// array is casted as a new `ObjectProp`
dd($x->meta->first());



  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example
Accessible without login Plain text file helpers.php Aux. helpers
Plain text file ObjectProp.php Class Object Property Extension for Collection
Plain text file ObjectPropDataType.php Class Object Property Data Type Class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:72
This week:0
All time:10,234
This week:455Up