laravel-5.2

ErrorException: Trying to get property of non-object: (using laravel)

喜夏-厌秋 提交于 2020-01-25 16:30:04
问题 ErrorException: Trying to get property of non-object: PHP beginner Trying to retreive data from database. show.blade.php @extends('main') @section('title','| Station details') @section('content') <h1>{{ $station->station_name }}</h1> <p class="lead">{{ $station->station_name }}</p> @endsection controller - <?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Requests; use App\Station; use Session; class StationController extends Controller { /** * Display a listing

Limit on amount of rows retrieved MySql, Laravel

江枫思渺然 提交于 2020-01-24 13:37:30
问题 The Question My question is are there any limitations on the amount of rows that are returned via query using either Mysql or Laravel? Firstly Im using Laravel 5.2 and i am trying to retrieve my data from my logs table which has recently hit over 10k rows, Now since then (or around that time) the usual laravel syntax to retrieve the data isnt working Syntax $logs = Log::all() return $logs; //This is then handled by Vue.js on the client side It used to work fine now it doesnt, nothing is

Limit on amount of rows retrieved MySql, Laravel

孤街浪徒 提交于 2020-01-24 13:35:18
问题 The Question My question is are there any limitations on the amount of rows that are returned via query using either Mysql or Laravel? Firstly Im using Laravel 5.2 and i am trying to retrieve my data from my logs table which has recently hit over 10k rows, Now since then (or around that time) the usual laravel syntax to retrieve the data isnt working Syntax $logs = Log::all() return $logs; //This is then handled by Vue.js on the client side It used to work fine now it doesnt, nothing is

Limit on amount of rows retrieved MySql, Laravel

爱⌒轻易说出口 提交于 2020-01-24 13:34:48
问题 The Question My question is are there any limitations on the amount of rows that are returned via query using either Mysql or Laravel? Firstly Im using Laravel 5.2 and i am trying to retrieve my data from my logs table which has recently hit over 10k rows, Now since then (or around that time) the usual laravel syntax to retrieve the data isnt working Syntax $logs = Log::all() return $logs; //This is then handled by Vue.js on the client side It used to work fine now it doesnt, nothing is

Limit on amount of rows retrieved MySql, Laravel

一曲冷凌霜 提交于 2020-01-24 13:33:25
问题 The Question My question is are there any limitations on the amount of rows that are returned via query using either Mysql or Laravel? Firstly Im using Laravel 5.2 and i am trying to retrieve my data from my logs table which has recently hit over 10k rows, Now since then (or around that time) the usual laravel syntax to retrieve the data isnt working Syntax $logs = Log::all() return $logs; //This is then handled by Vue.js on the client side It used to work fine now it doesnt, nothing is

Web middleware being applied to API routes in Laravel 5.2

谁都会走 提交于 2020-01-24 04:30:09
问题 I have the following routes in place: Route::group(['prefix' => 'api/v1', 'middleware' => 'api'], function() { Route::resource('authenticate', 'AuthenticateController', ['only' => ['index']]); Route::post('authenticate', 'AuthenticateController@authenticate'); Route::resource('users', 'UserController'); }); The UserController has a test to ensure that when a user is submitted via POST , that it validates the input correctly. This should return a 422 when invalid, but it actually returns a 302

Laravel 5 authentication middleware always redirects to root or login

不羁的心 提交于 2020-01-23 13:29:27
问题 When I protect routes in Laravel 5 it works well when I'm not logged in because it redirects the protected routes to the login page but once I login and try to access the protected routes it redirects me to the root route. For example if I try to access /people or /people/1 it will redirect me to / Here's my routes.php file: Route::get('/', function () { return view('welcome'); }); Route::group(['middleware' => ['auth']], function () { Route::resource('people', 'PeopleController'); Route:

Laravel 5 authentication middleware always redirects to root or login

十年热恋 提交于 2020-01-23 13:29:11
问题 When I protect routes in Laravel 5 it works well when I'm not logged in because it redirects the protected routes to the login page but once I login and try to access the protected routes it redirects me to the root route. For example if I try to access /people or /people/1 it will redirect me to / Here's my routes.php file: Route::get('/', function () { return view('welcome'); }); Route::group(['middleware' => ['auth']], function () { Route::resource('people', 'PeopleController'); Route:

Laravel 5 authentication middleware always redirects to root or login

只谈情不闲聊 提交于 2020-01-23 13:29:08
问题 When I protect routes in Laravel 5 it works well when I'm not logged in because it redirects the protected routes to the login page but once I login and try to access the protected routes it redirects me to the root route. For example if I try to access /people or /people/1 it will redirect me to / Here's my routes.php file: Route::get('/', function () { return view('welcome'); }); Route::group(['middleware' => ['auth']], function () { Route::resource('people', 'PeopleController'); Route:

Laravel 5.2 : How to access Request & Session Classes from own Event Listener?

感情迁移 提交于 2020-01-23 11:37:52
问题 In Laravel 5.2 , i have added my Event Listener (into app\Providers\EventServiceProvider.php ), like: protected $listen = [ 'Illuminate\Auth\Events\Login' => ['App\Listeners\UserLoggedIn'], ]; Then generated it: php artisan event:generate Then in the Event Listener file itself app/Listeners/UserLoggedIn.php , it's like: <?php namespace App\Listeners; use App\Listeners\Request; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Auth\Events\Login