diff --git a/src/BaseServiceProvider.php b/src/BaseServiceProvider.php
index 2d3ff0cf..b25609b4 100644
--- a/src/BaseServiceProvider.php
+++ b/src/BaseServiceProvider.php
@@ -1,8 +1,9 @@
publishes([ __DIR__.'/config/config.php' => config_path('backpack/base.php'), ], 'config');
+ $this->publishes([__DIR__.'/config/config.php' => config_path('backpack/base.php')], 'config');
// publish lang files
- $this->publishes([ __DIR__.'/resources/lang' => resource_path('lang/vendor/backpack'), ], 'lang');
+ $this->publishes([__DIR__.'/resources/lang' => resource_path('lang/vendor/backpack')], 'lang');
// publish views
- $this->publishes([ __DIR__.'/resources/views' => resource_path('views/vendor/backpack/base'), ], 'views');
+ $this->publishes([__DIR__.'/resources/views' => resource_path('views/vendor/backpack/base')], 'views');
// publish error views
- $this->publishes([ __DIR__.'/resources/error_views' => resource_path('views/errors'), ], 'errors');
+ $this->publishes([__DIR__.'/resources/error_views' => resource_path('views/errors')], 'errors');
// publish public Backpack assets
- $this->publishes([ __DIR__.'/public' => public_path('vendor/backpack'), ], 'public');
+ $this->publishes([__DIR__.'/public' => public_path('vendor/backpack')], 'public');
// publish public AdminLTE assets
- $this->publishes([ base_path('vendor/almasaeed2010/adminlte') => public_path('vendor/adminlte'), ], 'adminlte');
+ $this->publishes([base_path('vendor/almasaeed2010/adminlte') => public_path('vendor/adminlte')], 'adminlte');
// use the vendor configuration file as fallback
$this->mergeConfigFrom(
@@ -53,13 +54,13 @@ public function boot()
/**
* Define the routes for the application.
*
- * @param \Illuminate\Routing\Router $router
+ * @param \Illuminate\Routing\Router $router
+ *
* @return void
*/
public function setupRoutes(Router $router)
{
- $router->group(['namespace' => 'Backpack\Base\app\Http\Controllers'], function($router)
- {
+ $router->group(['namespace' => 'Backpack\Base\app\Http\Controllers'], function ($router) {
require __DIR__.'/app/Http/routes.php';
});
}
@@ -81,8 +82,8 @@ public function register()
private function registerBase()
{
- $this->app->bind('base',function($app){
+ $this->app->bind('base', function ($app) {
return new Base($app);
});
}
-}
\ No newline at end of file
+}
diff --git a/src/SkeletonClass.php b/src/SkeletonClass.php
index 4c0bfeb2..246378c9 100644
--- a/src/SkeletonClass.php
+++ b/src/SkeletonClass.php
@@ -5,7 +5,7 @@
class SkeletonClass
{
/**
- * Create a new Skeleton Instance
+ * Create a new Skeleton Instance.
*/
public function __construct()
{
@@ -13,7 +13,7 @@ public function __construct()
}
/**
- * Friendly welcome
+ * Friendly welcome.
*
* @param string $phrase Phrase to return
*
diff --git a/src/app/Http/Controllers/AdminController.php b/src/app/Http/Controllers/AdminController.php
index 2683b5e6..fbce11a2 100644
--- a/src/app/Http/Controllers/AdminController.php
+++ b/src/app/Http/Controllers/AdminController.php
@@ -2,10 +2,6 @@
namespace Backpack\Base\app\Http\Controllers;
-use App\Http\Requests;
-use Illuminate\Http\Request;
-use Prologue\Alerts\Facades\Alert as Alert;
-
class AdminController extends Controller
{
protected $data = []; // the information we send to the view
@@ -25,7 +21,7 @@ public function __construct()
*/
public function dashboard()
{
- $this->data['title'] = "Dashboard"; // set the page title
+ $this->data['title'] = 'Dashboard'; // set the page title
return view('backpack::dashboard', $this->data);
}
diff --git a/src/app/Http/Controllers/Auth/AuthController.php b/src/app/Http/Controllers/Auth/AuthController.php
index d1ea175c..be6668f9 100644
--- a/src/app/Http/Controllers/Auth/AuthController.php
+++ b/src/app/Http/Controllers/Auth/AuthController.php
@@ -3,12 +3,12 @@
namespace Backpack\Base\app\Http\Controllers\Auth;
use App\User;
-use Validator;
-use Illuminate\Http\Request;
use Backpack\Base\app\Http\Controllers\Controller;
-use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
+use Illuminate\Foundation\Auth\ThrottlesLogins;
+use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
+use Validator;
class AuthController extends Controller
{
@@ -47,14 +47,15 @@ public function __construct()
/**
* Get a validator for an incoming registration request.
*
- * @param array $data
+ * @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',
+ 'name' => 'required|max:255',
+ 'email' => 'required|email|max:255|unique:users',
'password' => 'required|confirmed|min:6',
]);
}
@@ -62,27 +63,23 @@ protected function validator(array $data)
/**
* Create a new user instance after a valid registration.
*
- * @param array $data
+ * @param array $data
+ *
* @return User
*/
protected function create(array $data)
{
return User::create([
- 'name' => $data['name'],
- 'email' => $data['email'],
+ 'name' => $data['name'],
+ 'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
-
-
-
// -------------------------------------------------------
// Laravel overwrites for loading backpack views
// -------------------------------------------------------
-
-
/**
* Show the application login form.
*
@@ -97,7 +94,7 @@ public function showLoginForm()
return view($view);
}
- $this->data['title'] = "Login"; // set the page title
+ $this->data['title'] = 'Login'; // set the page title
return view('backpack::auth.login', $this->data);
}
@@ -110,8 +107,7 @@ public function showLoginForm()
public function showRegistrationForm()
{
// if registration is closed, deny access
- if (!config('base.registration_open'))
- {
+ if (!config('base.registration_open')) {
abort(403, trans('backpack::base.registration_closed'));
}
@@ -119,7 +115,7 @@ public function showRegistrationForm()
return view($this->registerView);
}
- $this->data['title'] = "Register"; // set the page title
+ $this->data['title'] = 'Register'; // set the page title
return view('backpack::auth.register', $this->data);
}
@@ -127,14 +123,14 @@ public function showRegistrationForm()
/**
* Handle a registration request for the application.
*
- * @param \Illuminate\Http\Request $request
+ * @param \Illuminate\Http\Request $request
+ *
* @return \Illuminate\Http\Response
*/
public function register(Request $request)
{
// if registration is closed, deny access
- if (!config('base.registration_open'))
- {
+ if (!config('base.registration_open')) {
abort(403, trans('backpack::base.registration_closed'));
}
diff --git a/src/app/Http/Controllers/Auth/PasswordController.php b/src/app/Http/Controllers/Auth/PasswordController.php
index 3f80bb2a..f9832691 100644
--- a/src/app/Http/Controllers/Auth/PasswordController.php
+++ b/src/app/Http/Controllers/Auth/PasswordController.php
@@ -5,7 +5,6 @@
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Http\Request;
-use Illuminate\Mail\Message;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Password;
@@ -36,16 +35,10 @@ public function __construct()
$this->middleware('guest');
}
-
-
-
// -------------------------------------------------------
// Laravel overwrites for loading backpack views
// -------------------------------------------------------
-
-
-
/**
* Display the form to request a password reset link.
*
@@ -53,7 +46,7 @@ public function __construct()
*/
public function showLinkRequestForm()
{
- $this->data['title'] = "Reset password"; // set the page title
+ $this->data['title'] = 'Reset password'; // set the page title
if (property_exists($this, 'linkRequestView')) {
return view($this->linkRequestView);
@@ -71,13 +64,14 @@ public function showLinkRequestForm()
*
* If no token is present, display the link request form.
*
- * @param \Illuminate\Http\Request $request
- * @param string|null $token
+ * @param \Illuminate\Http\Request $request
+ * @param string|null $token
+ *
* @return \Illuminate\Http\Response
*/
public function showResetForm(Request $request, $token = null)
{
- $this->data['title'] = "Reset password"; // set the page title
+ $this->data['title'] = 'Reset password'; // set the page title
if (is_null($token)) {
return $this->getEmail();
diff --git a/src/app/Http/Controllers/Controller.php b/src/app/Http/Controllers/Controller.php
index 68fafa32..1bc10ceb 100644
--- a/src/app/Http/Controllers/Controller.php
+++ b/src/app/Http/Controllers/Controller.php
@@ -2,12 +2,12 @@
namespace Backpack\Base\app\Http\Controllers;
+use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
-use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
-use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
+use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
-}
\ No newline at end of file
+}
diff --git a/src/app/Http/routes.php b/src/app/Http/routes.php
index f6b79059..e48fda6d 100644
--- a/src/app/Http/routes.php
+++ b/src/app/Http/routes.php
@@ -2,7 +2,7 @@
// All BackPack routes are placed under the 'admin' prefix, to minimize possible conflicts with your application. This means your login/logout/register urls are also under the 'admin' prefix, so you can have separate logins for users and admins.
Route::group(['middleware' => 'web', 'prefix' => 'admin'], function () {
- // Admin authentication routes
+ // Admin authentication routes
Route::auth();
// Other Backpack\Base routes
@@ -14,4 +14,4 @@
// The login url is hardcoded in Laravel in a few places, most importantly in the auth middleware. If your application has a different login for users (non-admins), you should consider overwriting this.
Route::get('login', function () {
return redirect('admin/login');
-});
\ No newline at end of file
+});
diff --git a/src/config/config.php b/src/config/config.php
index 0ebe60b0..a33c4ea3 100644
--- a/src/config/config.php
+++ b/src/config/config.php
@@ -2,48 +2,46 @@
return [
- /*
- |--------------------------------------------------------------------------
- | Look & feel customizations
- |--------------------------------------------------------------------------
- |
- | Make it yours.
- |
- */
-
- // Project name. Shown in the breadcrumbs and a few other places.
- 'project_name' => 'Backpack',
-
- // Menu logos
- 'logo_lg' => 'Backpack',
- 'logo_mini' => 'Bp',
-
-
- // Developer or company name. Shown in footer.
- 'developer_name' => 'Cristian Tabacitu',
-
- // Developer website. Link in footer.
- 'developer_link' => 'http://tabacitu.ro',
-
- // Show powered by Laravel Backpack in the footer?
- 'show_powered_by' => true,
-
- // The AdminLTE skin. Affects menu color and primary/secondary colors used throughout the application.
- 'skin' => 'skin-purple',
- // Options: skin-black, skin-blue, skin-purple, skin-red, skin-yellow, skin-green, skin-blue-light, skin-black-light, skin-purple-light, skin-green-light, skin-red-light, skin-yellow-light
-
-
- /*
- |--------------------------------------------------------------------------
- | Registration Open
- |--------------------------------------------------------------------------
- |
- | Choose wether new users are allowed to register.
- | This will show up the Register button in the menu and allow access to the
- | Register functions in AuthController.
- |
- */
-
- 'registration_open' => true,
+ /*
+ |--------------------------------------------------------------------------
+ | Look & feel customizations
+ |--------------------------------------------------------------------------
+ |
+ | Make it yours.
+ |
+ */
+
+ // Project name. Shown in the breadcrumbs and a few other places.
+ 'project_name' => 'Backpack',
+
+ // Menu logos
+ 'logo_lg' => 'Backpack',
+ 'logo_mini' => 'Bp',
+
+ // Developer or company name. Shown in footer.
+ 'developer_name' => 'Cristian Tabacitu',
+
+ // Developer website. Link in footer.
+ 'developer_link' => 'http://tabacitu.ro',
+
+ // Show powered by Laravel Backpack in the footer?
+ 'show_powered_by' => true,
+
+ // The AdminLTE skin. Affects menu color and primary/secondary colors used throughout the application.
+ 'skin' => 'skin-purple',
+ // Options: skin-black, skin-blue, skin-purple, skin-red, skin-yellow, skin-green, skin-blue-light, skin-black-light, skin-purple-light, skin-green-light, skin-red-light, skin-yellow-light
+
+ /*
+ |--------------------------------------------------------------------------
+ | Registration Open
+ |--------------------------------------------------------------------------
+ |
+ | Choose wether new users are allowed to register.
+ | This will show up the Register button in the menu and allow access to the
+ | Register functions in AuthController.
+ |
+ */
+
+ 'registration_open' => true,
];