Skip to content

[Maybe BUG] Laravel 5 softDeletes Model cause blank white page response if table don't have deleted_at column #3514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 171 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
6184206
upgrade version.
taylorotwell Feb 4, 2015
9da5d30
upgrade version.
taylorotwell Feb 4, 2015
b2c2962
Merge branch 'master' into develop
taylorotwell Feb 6, 2015
38aae74
Merge branch 'master' into develop
taylorotwell Feb 11, 2015
da6fc17
Merge branch 'master' into develop
taylorotwell Feb 11, 2015
d75ed33
Merge branch 'master' into develop
taylorotwell Feb 12, 2015
c170c76
Fixed 5.1 installation
GrahamCampbell Feb 15, 2015
d5f285b
Simplify authentication. Remove service.
taylorotwell Feb 17, 2015
d2d9c79
Tweaks.
taylorotwell Feb 17, 2015
1500a18
Tweak some jobs and names.
taylorotwell Feb 21, 2015
01cf5f1
Merge pull request #3267 from GrahamForks/fix
taylorotwell Feb 23, 2015
2f17860
Merge branch 'master' into develop
taylorotwell Feb 23, 2015
76d4c11
Merge branch 'master' into develop
taylorotwell Feb 23, 2015
f424b87
PSR-2 for app.
taylorotwell Feb 23, 2015
cc2139a
Tweaking a few things.
taylorotwell Feb 23, 2015
4c78958
Tweak a few things.
taylorotwell Feb 23, 2015
e590bf2
Merge branch 'master' into develop
taylorotwell Feb 25, 2015
eacb058
Connection setting in Redis queue.
taylorotwell Feb 25, 2015
4f88bcb
Use "for" attribute on labels in auth views
marcus-herrmann Feb 25, 2015
73e1c71
Merge pull request #3279 from marcus-herrmann/develop
taylorotwell Feb 25, 2015
338f5f1
fix conflicts.
taylorotwell Feb 26, 2015
5e71bca
fix bad merge.
taylorotwell Feb 26, 2015
5e71cc5
conflicts.
taylorotwell Feb 26, 2015
055edad
Merge branch 'master' into develop
taylorotwell Mar 2, 2015
c9c0380
Just use helper function in middleware.
taylorotwell Mar 2, 2015
8909e75
Some spacing.
taylorotwell Mar 2, 2015
fad5c6e
support for unencrypted mail server usage like mailcatcher.me
sineld Mar 4, 2015
ce5bcb2
Merge pull request #3304 from sineld/develop
taylorotwell Mar 4, 2015
5644e8e
fix conflicts.
taylorotwell Mar 14, 2015
5e11f87
Remove auth scaffolding to make it opt-in.
taylorotwell Mar 18, 2015
1f5681b
Remove space.
taylorotwell Mar 20, 2015
0bbe752
Fix more spacing.
Mar 21, 2015
3e9422b
Merge pull request #3315 from taiyaei/fix-spacing
taylorotwell Mar 21, 2015
4e0b15f
Use new bootstrap/cache for cached optimizations loaded during bootst…
taylorotwell Mar 25, 2015
9534ded
Add FTP adapter to filesystem config
Mar 26, 2015
84028d4
Merge pull request #3320 from garygreen/ftp-adapter
taylorotwell Mar 26, 2015
3516f4f
Use single logs by default.
taylorotwell Mar 27, 2015
3b7e6dc
fix a bunch of stufF
taylorotwell Apr 11, 2015
3dcefec
Update Kernel.php
laurencei Apr 19, 2015
2040080
Merge pull request #3343 from TheShiftExchange/patch-2
GrahamCampbell Apr 19, 2015
111fdeb
Don't compile service providers by default.
taylorotwell Apr 21, 2015
2d9b695
Simplify opening routes.
taylorotwell Apr 21, 2015
161ebda
Revert "[5.1] Add new middleware"
taylorotwell Apr 22, 2015
58ecbcd
Merge pull request #3346 from laravel/revert-3343-patch-2
taylorotwell Apr 22, 2015
ae78cd9
Documented availability of SES mail driver in mail config
fideloper Apr 27, 2015
bd9a4f5
Some sample configuration.
taylorotwell Apr 27, 2015
f8da289
Tweak configuration file name.
taylorotwell Apr 27, 2015
b7c2373
Redis configuration.
taylorotwell Apr 27, 2015
71e3391
Merge pull request #3351 from fideloper/patch-1
taylorotwell Apr 28, 2015
88f5182
Use short-cut.
taylorotwell Apr 28, 2015
4e8d553
Stub out except property.
taylorotwell Apr 30, 2015
b22a1f4
Fix typo.
taylorotwell Apr 30, 2015
f4a2282
Add migration stubs.
taylorotwell Apr 30, 2015
89f5681
No need to override this by default anymore.
taylorotwell Apr 30, 2015
89e2d8e
Auth controller stubs.
taylorotwell May 2, 2015
1c4dcea
Add log driver to broadcasting connections
patrickbrouwers May 6, 2015
0d541ec
Merge pull request #3360 from patrickbrouwers/patch-2
taylorotwell May 6, 2015
ed93318
Update test case.
taylorotwell May 6, 2015
7477ec9
Pull in Mockery for mocking.
taylorotwell May 7, 2015
fdf6dd7
Stub factory.
taylorotwell May 8, 2015
f1beeb4
Remove redundant Closure namespace import in VerifyCsrfToken
patrickbrouwers May 9, 2015
e11d40a
Merge pull request #3368 from patrickbrouwers/patch-1
taylorotwell May 9, 2015
9a6c3df
Use define syntax.
taylorotwell May 9, 2015
b21d263
Use DispatchesJobs.
taylorotwell May 9, 2015
d502747
Show example base variables.
taylorotwell May 10, 2015
4341e3c
Remove unnecessary whitespace
mul14 May 10, 2015
e0ddb26
Merge pull request #3372 from mul14/patch-1
taylorotwell May 10, 2015
2e1a1a6
Base job use trait.
taylorotwell May 11, 2015
41472b7
Use signature to define name.
taylorotwell May 13, 2015
9446685
Fix order of validation rules.
taylorotwell May 21, 2015
89b193a
Added title tag
May 22, 2015
f17d0e8
Merge pull request #3384 from rafaelfs17/patch-1
taylorotwell May 22, 2015
e111f1e
add period.
taylorotwell May 22, 2015
4e4b2b8
Add faker to require-dev
May 25, 2015
d68b5b8
Merge pull request #3388 from GrahamForks/faker
taylorotwell May 25, 2015
5c16c21
Add env variable to database default connection
marcanuy May 25, 2015
685e3cf
Merge pull request #3390 from marcanuy/develop
taylorotwell May 25, 2015
dff91c9
update filesystem config.
taylorotwell May 26, 2015
2e2ead5
Merge branch 'develop' of github.com:laravel/laravel into develop
taylorotwell May 26, 2015
c3128ad
import trait
taylorotwell May 28, 2015
4ee6523
Using the path parameter in the path method.
jimmypuckett May 28, 2015
6575cb7
Merge pull request #3395 from spinen/feature/usePathParameter
taylorotwell May 28, 2015
03a27fa
Enable model guarding after doing seeds
phaza May 31, 2015
f871b7d
Merge pull request #3397 from phaza/patch-2
taylorotwell May 31, 2015
c77a389
Tabs to spaces
Jun 1, 2015
060938b
PSR-2
Jun 1, 2015
bf3785d
Additional cs fixes
Jun 1, 2015
9b6d5f4
Merge pull request #3399 from GrahamForks/cs
taylorotwell Jun 1, 2015
2ac993f
[5.1] Move copying .env.example to post-root-package-install
crynobone Jun 1, 2015
9293247
Merge pull request #3398 from crynobone/feature/root-install
taylorotwell Jun 2, 2015
f0cad01
remove cipher option
taylorotwell Jun 3, 2015
1ba2816
Merge remote-tracking branch 'origin/develop' into develop
taylorotwell Jun 3, 2015
4c291ab
Added back cipher config
Jun 4, 2015
4b3391f
Use PHP 5.5 ::class property in config files
Jun 5, 2015
86e53af
Merge pull request #3403 from RomainLanz/patch-1
taylorotwell Jun 5, 2015
58db25b
Use the ::class notation
nWidart Jun 5, 2015
e4796a2
Merge pull request #3405 from nWidart/patch-1
taylorotwell Jun 5, 2015
bacda07
Change default cipher.
taylorotwell Jun 6, 2015
16e37cb
Use the ::class notation
pespantelis Jun 8, 2015
a1a55fe
Merge pull request #3410 from pespantelis/class-notation
taylorotwell Jun 8, 2015
9a70a4b
Update PHP dependencies.
taylorotwell Jun 9, 2015
f9ed4ff
Override cookie encrypter by default.
taylorotwell Jun 9, 2015
ff441ab
fix conflicts
taylorotwell Jun 9, 2015
347b928
Bump elixir requirement.
taylorotwell Jun 9, 2015
19e97fc
Added whitelist to remove warning for upcoming phpunit 4.8
martinssipenko Jun 10, 2015
fa756ff
Merge pull request #3415 from martinssipenko/master
taylorotwell Jun 10, 2015
936aa91
fix doctype declarations
Jun 11, 2015
44787b0
fix css
Jun 11, 2015
f6e6508
Merge pull request #3416 from krienow/doctype
taylorotwell Jun 11, 2015
2c4964e
Set default charset for sqlsrv driver to utf8
Jun 11, 2015
136d7fa
Merge pull request #3418 from baspeters/feature/sqlsrv-default-charset
taylorotwell Jun 11, 2015
26b6b8e
Set minimum stability to stable
barryvdh Jun 14, 2015
5033b85
Merge pull request #3421 from barryvdh/patch-1
taylorotwell Jun 14, 2015
63ba6de
remove prefer stable
taylorotwell Jun 14, 2015
15d6f3f
remove stability setting
taylorotwell Jun 14, 2015
7e30301
Sync with 5.0
Jun 15, 2015
d64b5a5
Maintain alphabetical order
Phyxsius Jun 16, 2015
3b0d039
Merge pull request #3426 from Phyxsius/patch-2
taylorotwell Jun 16, 2015
7a8800c
add Homestead.yaml to gitignore
taylorotwell Jun 20, 2015
69076cb
Merge remote-tracking branch 'origin/master'
taylorotwell Jun 20, 2015
ad08717
tweak default asset setup
taylorotwell Jun 22, 2015
04709cf
tweak package file
taylorotwell Jun 23, 2015
8910cb9
Use the ::class notation
josezenem Jun 23, 2015
9089b7e
Merge pull request #3434 from josezenem/master
taylorotwell Jun 23, 2015
bb86ab6
use double quotes for html attributes
tonglil Jun 23, 2015
2dd8ed1
Merge pull request #3435 from tonglil/master
taylorotwell Jun 23, 2015
09d028f
change welcome splash
taylorotwell Jun 25, 2015
a9ca36a
no margin needed.
taylorotwell Jun 25, 2015
dd036f5
Fix redirect loop .htaccess
bbashy Jun 26, 2015
99d25ec
Merge pull request #3438 from bbashy/patch-1
taylorotwell Jun 26, 2015
804b9d7
fix wording
taylorotwell Jun 26, 2015
5deca95
Change comment to reflect the change of the default css preprocessor.
mikaelmattsson Jun 27, 2015
07cb1eb
Merge pull request #3440 from mikaelmattsson/patch-1
taylorotwell Jun 27, 2015
901a45f
added throttles logins trait by default
taylorotwell Jul 1, 2015
bd583fe
Add ThrottleLogin localization support
antonybudianto Jul 2, 2015
48abc56
Merge pull request #3444 from antonybudianto/patch-1
taylorotwell Jul 2, 2015
ecd52ef
fix order
taylorotwell Jul 2, 2015
ef95871
change language files
taylorotwell Jul 4, 2015
7bb1326
type hint faker generator
browner12 Jul 7, 2015
037769e
remove leading slash
browner12 Jul 7, 2015
e3f18ea
Merge pull request #3449 from browner12/patch-1
taylorotwell Jul 8, 2015
83ffbc6
Using the bcrypt function in users generated by the model factory
sileence Jul 13, 2015
5964dcf
Merge pull request #3456 from sileence/bcrypt_password_factory
taylorotwell Jul 14, 2015
fef3aa0
Newline.
jonathantorres Jul 17, 2015
9b359ba
Merge pull request #3459 from jonathantorres/new-line
taylorotwell Jul 18, 2015
191c687
Sorted by alphabetic.
Jul 23, 2015
0cf34a3
Merge pull request #3465 from jumilla/patch-1
taylorotwell Jul 23, 2015
8061c21
Convert some variables to env variables in services.php.
taylorotwell Jul 23, 2015
12386cf
Ignore Homestead.json
andrewhood125 Jul 25, 2015
9d82fc6
Merge pull request #3467 from andrewhood125/homestead-json
taylorotwell Jul 26, 2015
64e1cf9
Bump Laravel Elixir version
Jul 27, 2015
51299e7
Merge pull request #3468 from laracasts/patch-1
taylorotwell Jul 28, 2015
da7376d
working on exception handling for model not found.
taylorotwell Aug 6, 2015
f478406
Merge remote-tracking branch 'origin/master'
taylorotwell Aug 6, 2015
395b69b
fix status code
taylorotwell Aug 6, 2015
f047f80
fix incorrect method name in comment.
taylorotwell Aug 8, 2015
33272b3
Error message for JSON validation
bmitch Aug 16, 2015
2ddeae9
Merge pull request #3480 from bmitch/JsonErrorMsg
taylorotwell Aug 16, 2015
b8790d5
Use https rather than // for google fonts in default views.
Zarthus Aug 17, 2015
f40e72f
Merge pull request #3484 from Zarthus/patch/views-use-https
taylorotwell Aug 17, 2015
c82c5ec
acl changes
taylorotwell Aug 29, 2015
9bb3c9f
Merge remote-tracking branch 'origin/master'
taylorotwell Aug 29, 2015
72a10c6
Define HasAbilities trait on default user.
taylorotwell Aug 29, 2015
420e813
Implement interface.
taylorotwell Aug 29, 2015
7d4b5d7
Default auth service provider.
taylorotwell Aug 30, 2015
35654d7
Applied fixes from StyleCI
GrahamCampbell Aug 30, 2015
716e652
Merge pull request #3491 from laravel/analysis-zObJlq
GrahamCampbell Aug 30, 2015
879bc14
Replace storage_path with database_path helper
pedes42 Sep 18, 2015
24575f4
Merge pull request #3500 from pedes42/master
taylorotwell Sep 18, 2015
50357d8
Use $this instead of parent.
crynobone Sep 21, 2015
b0a22fc
Merge pull request #3501 from crynobone/feature/use-this
taylorotwell Sep 21, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/vendor
/node_modules
Homestead.yaml
Homestead.json
.env
7 changes: 0 additions & 7 deletions app/Commands/Command.php

This file was deleted.

51 changes: 26 additions & 25 deletions app/Console/Commands/Inspire.php
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
<?php namespace App\Console\Commands;
<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Foundation\Inspiring;

class Inspire extends Command {

/**
* The console command name.
*
* @var string
*/
protected $name = 'inspire';

/**
* The console command description.
*
* @var string
*/
protected $description = 'Display an inspiring quote';
class Inspire extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'inspire';

/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
}
/**
* The console command description.
*
* @var string
*/
protected $description = 'Display an inspiring quote';

/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
}
}
47 changes: 24 additions & 23 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
<?php namespace App\Console;
<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel {

/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
'App\Console\Commands\Inspire',
];

/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('inspire')
->hourly();
}
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
\App\Console\Commands\Inspire::class,
];

/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('inspire')
->hourly();
}
}
9 changes: 5 additions & 4 deletions app/Events/Event.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php namespace App\Events;
<?php

abstract class Event {

//
namespace App\Events;

abstract class Event
{
//
}
77 changes: 43 additions & 34 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
@@ -1,42 +1,51 @@
<?php namespace App\Exceptions;
<?php

namespace App\Exceptions;

use Exception;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;

class Handler extends ExceptionHandler {

/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
'Symfony\Component\HttpKernel\Exception\HttpException'
];
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
HttpException::class,
ModelNotFoundException::class,
];

/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $e
* @return void
*/
public function report(Exception $e)
{
return parent::report($e);
}
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $e
* @return void
*/
public function report(Exception $e)
{
return parent::report($e);
}

/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
{
return parent::render($request, $e);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
{
if ($e instanceof ModelNotFoundException) {
$e = new NotFoundHttpException($e->getMessage(), $e);
}

return parent::render($request, $e);
}
}
85 changes: 56 additions & 29 deletions app/Http/Controllers/Auth/AuthController.php
Original file line number Diff line number Diff line change
@@ -1,38 +1,65 @@
<?php namespace App\Http\Controllers\Auth;
<?php

namespace App\Http\Controllers\Auth;

use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\Registrar;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;

class AuthController extends Controller {

/*
|--------------------------------------------------------------------------
| Registration & Login Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users, as well as the
| authentication of existing users. By default, this controller uses
| a simple trait to add these behaviors. Why don't you explore it?
|
*/
class AuthController extends Controller
{
/*
|--------------------------------------------------------------------------
| Registration & Login Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users, as well as the
| authentication of existing users. By default, this controller uses
| a simple trait to add these behaviors. Why don't you explore it?
|
*/

use AuthenticatesAndRegistersUsers;
use AuthenticatesAndRegistersUsers, ThrottlesLogins;

/**
* Create a new authentication controller instance.
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\Registrar $registrar
* @return void
*/
public function __construct(Guard $auth, Registrar $registrar)
{
$this->auth = $auth;
$this->registrar = $registrar;
/**
* Create a new authentication controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest', ['except' => 'getLogout']);
}

$this->middleware('guest', ['except' => 'getLogout']);
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|confirmed|min:6',
]);
}

/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
}
56 changes: 25 additions & 31 deletions app/Http/Controllers/Auth/PasswordController.php
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
<?php namespace App\Http\Controllers\Auth;
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\PasswordBroker;
use Illuminate\Foundation\Auth\ResetsPasswords;

class PasswordController extends Controller {

/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/

use ResetsPasswords;

/**
* Create a new password controller instance.
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
* @return void
*/
public function __construct(Guard $auth, PasswordBroker $passwords)
{
$this->auth = $auth;
$this->passwords = $passwords;
class PasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/

$this->middleware('guest');
}
use ResetsPasswords;

/**
* Create a new password controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
Loading