Exemplo n.º 1
0
 /**
  * Get an array of all storage models.
  *
  * @return array
  */
 public function all()
 {
     // Get items from database.
     $items = Storage::orderBy('id', 'desc')->get();
     // Record buffer.
     $records = [];
     // Iterate collection.
     foreach ($items as $item) {
         // Add record to array.
         $records[] = $item;
     }
     // Return a list of storage objects.
     return $records;
 }