class sessions extends Model {
protected $table = 'sessions';
public function getAll() {
return $this->get()->toArray();
}
}
class testController extends Controller {
public function midd(Request $request) {
$x = new Sessions();
$c = $x->getAll();
print_r($c, 1);
}
}
$data = DB::table('sessions')->get();
class Flight extends Model
{
/**
* Indicates if the IDs are auto-incrementing.
*
* @var bool
*/
public $incrementing = false;
}