Skip to content

Commit 1ccb470

Browse files
committed
l11 update
1 parent 715d28e commit 1ccb470

File tree

142 files changed

+2084
-76322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+2084
-76322
lines changed

app/Authorizable.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace App;
44

55
use Illuminate\Support\Arr;
6+
use Illuminate\Support\Facades\Gate;
67
use Illuminate\Support\Facades\Route;
78

89
trait Authorizable
@@ -32,7 +33,7 @@ trait Authorizable
3233
public function callAction($method, $parameters)
3334
{
3435
if ($ability = $this->getAbility($method)) {
35-
$this->authorize($ability);
36+
Gate::authorize($ability);
3637
}
3738

3839
return parent::callAction($method, $parameters);

app/Console/Kernel.php

-30
This file was deleted.

app/Exceptions/Handler.php

-36
This file was deleted.

app/Http/Controllers/Controller.php

+13-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22

33
namespace App\Http\Controllers;
44

5-
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
6-
use Illuminate\Foundation\Validation\ValidatesRequests;
7-
use Illuminate\Routing\Controller as BaseController;
5+
use BadMethodCallException;
86

9-
class Controller extends BaseController
7+
abstract class Controller
108
{
11-
use AuthorizesRequests, ValidatesRequests;
9+
/**
10+
* Execute an action on the controller.
11+
*
12+
* @param string $method
13+
* @param array $parameters
14+
* @return \Symfony\Component\HttpFoundation\Response
15+
*/
16+
public function callAction($method, $parameters)
17+
{
18+
return $this->{$method}(...array_values($parameters));
19+
}
1220
}

app/Http/Kernel.php

-72
This file was deleted.

app/Http/Middleware/Authenticate.php

-17
This file was deleted.

app/Http/Middleware/EncryptCookies.php

-17
This file was deleted.

0 commit comments

Comments
 (0)