Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
diydeveloper authored Apr 24, 2019
1 parent d31cfd1 commit 76b5c41
Showing 1 changed file with 74 additions and 75 deletions.
149 changes: 74 additions & 75 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ https://github.com/diyphpdeveloper/cms-canvas/wiki

# Requirements

CMS Canvas requires Laravel 5.3 or 5.2 and a MySQL server.
CMS Canvas requires Laravel 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, or 5.8 and a MySQL server.

# Installation

Expand Down Expand Up @@ -38,94 +38,93 @@ DB_PASSWORD=root

# Quick Start

Once Composer has installed or updated you will need to register CMS Canvas with Laravel itself. Open up config/app.php and find the providers key, towards the end of the file, and add the following just prior to the application service providers:

```php
'providers' => [
...
CmsCanvas\Providers\CmsCanvasServiceProvider::class,
CmsCanvas\Providers\RouteServiceProvider::class,
CmsCanvas\Providers\EventServiceProvider::class,
CmsCanvas\Providers\TwigBridgeServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,

/*
* Application Service Providers...
*/
...
],
```

Now find the alliases key, again towards the end of the file, and add the following to the end:

```php
'aliases' => [
...
'Admin' => CmsCanvas\Support\Facades\Admin::class,
'Content' => CmsCanvas\Support\Facades\Content::class,
'Theme' => CmsCanvas\Support\Facades\Theme::class,
'StringView' => CmsCanvas\Support\Facades\StringView::class,
'Form' => Collective\Html\FormFacade::class,
'HTML' => Collective\Html\HtmlFacade::class,
'Twig' => TwigBridge\Facade\Twig::class,
],
```

Update the providers array in config/auth.php to use CMS Canvas's user model:
1. Once Composer has installed or updated you will need to register CMS Canvas's user model with Laravel. To do this update the providers array in config/auth.php to:

```php
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => CmsCanvas\Models\User::class,
```php
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => CmsCanvas\Models\User::class,
],
],
],
```

Now that config/app.php and config/auth.php is configured, use Artisan to add CMS Canvas's templates and configs:
```

2. If running **Larevel 5.2 to 5.4** you will need to manually register providers and aliases. If you are running Laravel 5.5 or greater this step can be skipped. Open up config/app.php and find the providers key, towards the end of the file, and add the following just prior to the application service providers:

```php
'providers' => [
...
CmsCanvas\Providers\CmsCanvasServiceProvider::class,
CmsCanvas\Providers\RouteServiceProvider::class,
CmsCanvas\Providers\EventServiceProvider::class,
CmsCanvas\Providers\TwigBridgeServiceProvider::class,
Collective\Html\HtmlServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,

/*
* Application Service Providers...
*/
...
],
```

Now find the alliases key, again towards the end of the file, and add the following to the end:

```php
'aliases' => [
...
'Admin' => CmsCanvas\Support\Facades\Admin::class,
'Content' => CmsCanvas\Support\Facades\Content::class,
'Theme' => CmsCanvas\Support\Facades\Theme::class,
'StringView' => CmsCanvas\Support\Facades\StringView::class,
'Form' => Collective\Html\FormFacade::class,
'HTML' => Collective\Html\HtmlFacade::class,
'Twig' => TwigBridge\Facade\Twig::class,
],
```

```php
php artisan vendor:publish
```
3. Now that config/app.php and config/auth.php is configured, use Artisan to add CMS Canvas's templates and configs:

Next use Artisan to create CMS Canvas's database tables:
```php
php artisan vendor:publish
```

```php
php artisan migrate
```
4. Next use Artisan to create CMS Canvas's database tables:

Populate the database tables with the default data required for CMS Canvas to run:
```php
php artisan migrate
```

```php
php artisan db:seed --class="CmsCanvas\Database\Seeds\DatabaseSeeder"
```
5. Populate the database tables with the default data required for CMS Canvas to run:

Make the following directories writable:
```php
php artisan db:seed --class="CmsCanvas\Database\Seeds\DatabaseSeeder"
```

```bash
chmod 777 public/diyphpdeveloper/cmscanvas/thumbnails
chmod 777 public/diyphpdeveloper/cmscanvas/uploads
```
6. Make the following directories writable:

Finally, remove any root (home page) routes from app/Http/routes.php (Laravel 5.2) or routes/web.php (Laravel 5.3)
```bash
chmod 777 public/diyphpdeveloper/cmscanvas/thumbnails
chmod 777 public/diyphpdeveloper/cmscanvas/uploads
```

```php
// app/Http/routes.php (Laravel 5.2) or routes/web.php (Laravel 5.3)
// The following is an example of what to remove:
- Route::get('/', function () {
- return view('welcome');
- });
```
7. Finally, remove any root (home page) routes from app/Http/routes.php (Laravel 5.2) or routes/web.php (Laravel 5.3)

To access the admin panel go to your web browser and visit:
```php
// app/Http/routes.php (Laravel 5.2) or routes/web.php (Laravel 5.3)
// The following is an example of what to remove:
- Route::get('/', function () {
- return view('welcome');
- });
```

```
http://yourdomain.com/sitemin
Email: admin@domain.com
Password: password
8. To access the admin panel go to your web browser and visit:

```
```
http://yourdomain.com/sitemin
Email: admin@domain.com
Password: password
```

Once you are logged in the first thing you should do is change your email and password!!!

Expand Down

0 comments on commit 76b5c41

Please sign in to comment.