Skip to content

Commit 62b3cb7

Browse files
Merge pull request #35 from creativetimofficial/master
Update to Laravel 8.x
2 parents 2b84f16 + 971c1e4 commit 62b3cb7

File tree

11 files changed

+21
-13
lines changed

11 files changed

+21
-13
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ All notable changes to `Argon` frontend preset for Laravel will be documented in
2424

2525
## Version 1.1.0 - 2020-03-18
2626
- Update to Laravel 7.x
27+
28+
## Version 1.1.1 - 2020-09-23
29+
- Update to Laravel 8.x
2730

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"homepage": "https://github.com/creativetimofficial/argon-dashboard-laravel",
66
"keywords": ["Laravel", "Preset", "Argon"],
77
"require": {
8-
"laravel/framework": "^7.0"
8+
"laravel/framework": "^8.0",
9+
"laravel/legacy-factories": "^1.0"
910
},
1011
"autoload": {
1112
"psr-4": {

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Argon Frontend Preset For Laravel Framework 5.5 and Up
1+
# Argon Frontend Preset For Laravel Framework 8.x and Up
22

33
![version](https://img.shields.io/badge/version-1.0.12-blue.svg) ![license](https://img.shields.io/badge/license-MIT-blue.svg) [![GitHub issues open](https://img.shields.io/github/issues/laravel-frontend-presets/argon.svg?maxAge=2592000)](https://github.com/laravel-frontend-presets/argon/issues?q=is%3Aopen+is%3Aissue) [![GitHub issues closed](https://img.shields.io/github/issues-closed-raw/laravel-frontend-presets/argon.svg?maxAge=2592000)](https://github.com/laravel-frontend-presets/argon/issues?q=is%3Aissue+is%3Aclosed)
44

@@ -29,7 +29,7 @@ After initializing a fresh instance of Laravel (and making all the necessary con
2929

3030
1. `Cd` to your Laravel app
3131
2. Type in your terminal: `composer require laravel/ui` and `php artisan ui vue --auth`
32-
3. Install this preset via `composer require laravel-frontend-presets/argon`. No need to register the service provider. Laravel 5.5 & up can auto detect the package.
32+
3. Install this preset via `composer require laravel-frontend-presets/argon`. No need to register the service provider. Laravel 8.x & up can auto detect the package.
3333
4. Run `php artisan ui argon` command to install the Argon preset. This will install all the necessary assets and also the custom auth views, it will also add the auth route in `routes/web.php`
3434
(NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php)
3535
5. In your terminal run `composer dump-autoload`

src/ArgonPreset.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected static function updateAuthViews()
103103
// Add Auth routes in 'routes/web.php'
104104
file_put_contents(
105105
'./routes/web.php',
106-
"Auth::routes();\n\nRoute::get('/home', 'HomeController@index')->name('home');\n\n",
106+
"Auth::routes();\n\nRoute::get('/home', 'App\Http\Controllers\HomeController@index')->name('home');\n\n",
107107
FILE_APPEND
108108
);
109109

@@ -120,7 +120,7 @@ protected static function updateAuthViews()
120120
public static function addUserManagement()
121121
{
122122
// Add seeder, controllers, requests and rules
123-
static::copyDirectory('database/seeds', app_path('../database/seeds'));
123+
static::copyDirectory('database/seeds', app_path('../database/seeders'));
124124

125125
static::copyFile('app/Http/Controllers/UserController.php', app_path('Http/Controllers/UserController.php'));
126126
static::copyFile('app/Http/Controllers/ProfileController.php', app_path('Http/Controllers/ProfileController.php'));
@@ -130,7 +130,7 @@ public static function addUserManagement()
130130
// Add routes
131131
file_put_contents(
132132
'./routes/web.php',
133-
"Route::group(['middleware' => 'auth'], function () {\n\tRoute::resource('user', 'UserController', ['except' => ['show']]);\n\tRoute::get('profile', ['as' => 'profile.edit', 'uses' => 'ProfileController@edit']);\n\tRoute::put('profile', ['as' => 'profile.update', 'uses' => 'ProfileController@update']);\n\tRoute::get('upgrade', function () {return view('pages.upgrade');})->name('upgrade'); \n\t Route::get('map', function () {return view('pages.maps');})->name('map');\n\t Route::get('icons', function () {return view('pages.icons');})->name('icons'); \n\t Route::get('table-list', function () {return view('pages.tables');})->name('table');\n\tRoute::put('profile/password', ['as' => 'profile.password', 'uses' => 'ProfileController@password']);\n});\n\n",
133+
"Route::group(['middleware' => 'auth'], function () {\n\tRoute::resource('user', 'App\Http\Controllers\UserController', ['except' => ['show']]);\n\tRoute::get('profile', ['as' => 'profile.edit', 'uses' => 'App\Http\Controllers\ProfileController@edit']);\n\tRoute::put('profile', ['as' => 'profile.update', 'uses' => 'App\Http\Controllers\ProfileController@update']);\n\tRoute::get('upgrade', function () {return view('pages.upgrade');})->name('upgrade'); \n\t Route::get('map', function () {return view('pages.maps');})->name('map');\n\t Route::get('icons', function () {return view('pages.icons');})->name('icons'); \n\t Route::get('table-list', function () {return view('pages.tables');})->name('table');\n\tRoute::put('profile/password', ['as' => 'profile.password', 'uses' => 'App\Http\Controllers\ProfileController@password']);\n});\n\n",
134134
FILE_APPEND
135135
);
136136

src/argon-stubs/app/Console/Commands/DeleteOldUsers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Console\Commands;
44

5-
use App\User;
5+
use App\Models\User;
66
use Illuminate\Console\Command;
77
use Illuminate\Support\Facades\Hash;
88

src/argon-stubs/app/Http/Controllers/Auth/RegisterController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Http\Controllers\Auth;
44

5-
use App\User;
5+
use App\Models\User;
66
use App\Http\Controllers\Controller;
77
use Illuminate\Support\Facades\Hash;
88
use Illuminate\Support\Facades\Validator;
@@ -59,7 +59,7 @@ protected function validator(array $data)
5959
* Create a new user instance after a valid registration.
6060
*
6161
* @param array $data
62-
* @return \App\User
62+
* @return \App\Models\User
6363
*/
6464
protected function create(array $data)
6565
{

src/argon-stubs/app/Http/Controllers/UserController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Http\Controllers;
44

5-
use App\User;
5+
use App\Models\User;
66
use App\Http\Requests\UserRequest;
77
use Illuminate\Support\Facades\Hash;
88

@@ -11,7 +11,7 @@ class UserController extends Controller
1111
/**
1212
* Display a listing of the users
1313
*
14-
* @param \App\User $model
14+
* @param \App\Models\User $model
1515
* @return \Illuminate\View\View
1616
*/
1717
public function index(User $model)

src/argon-stubs/app/Http/Requests/ProfileRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Http\Requests;
44

5-
use App\User;
5+
use App\Models\User;
66
use Illuminate\Validation\Rule;
77
use Illuminate\Foundation\Http\FormRequest;
88

src/argon-stubs/app/Http/Requests/UserRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Http\Requests;
44

5-
use App\User;
5+
use App\Models\User;
66
use Illuminate\Validation\Rule;
77
use Illuminate\Foundation\Http\FormRequest;
88

src/argon-stubs/database/seeds/DatabaseSeeder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
2+
namespace Database\Seeders;
23

4+
use Illuminate\Support\Facades\DB;
35
use Illuminate\Database\Seeder;
46

57
class DatabaseSeeder extends Seeder

0 commit comments

Comments
 (0)