Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #83 from jeremykenedy/master
Browse files Browse the repository at this point in the history
Update to work with l5.4 out the box
  • Loading branch information
rashidlaasri authored Jun 12, 2017
2 parents 97932d7 + aede1b0 commit d4ea4e7
Show file tree
Hide file tree
Showing 15 changed files with 11,356 additions and 120 deletions.
31 changes: 27 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
/vendor
composer.phar
composer.lock
### OSX BOOGERS ###
.DS_Store
.idea/
*._DS_Store
._.DS_Store
*._
._*
._.*

### WINDOWS BOOGERS ###
Thumbs.db

### Sass ###
/.sass-cache/*
.sass-cache

### SUBLIMETEXT BOOGERS ###
*.sublime-workspace

### PHPSTORM BOOGERS ###
.idea/*
/.idea/*

### DIFFERENT TYPE OF MASTER CONFIGS ###
composer.lock
.env

### ASSET EXCLUSIONS ###
vendor/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017 rachidlaasri ~ jeremykenedy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"RachidLaasri\\LaravelInstaller\\": "src/"
},
"files": [
"src/functions.php"
"src/Helpers/functions.php"
]
},
"minimum-stability": "stable"
Expand Down
101 changes: 68 additions & 33 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,97 @@
# Laravel Web Installer
# Laravel Web Installer | A Web Installer [Package](https://packagist.org/packages/rachidlaasri/laravel-installer)

[![Total Downloads](https://poser.pugx.org/rachidlaasri/laravel-installer/d/total.svg)](https://packagist.org/packages/rachidlaasri/laravel-installer)
[![Latest Stable Version](https://poser.pugx.org/rachidlaasri/laravel-installer/v/stable.svg)](https://packagist.org/packages/rachidlaasri/laravel-installer)
[![License](https://poser.pugx.org/rachidlaasri/laravel-installer/license.svg)](https://packagist.org/packages/rachidlaasri/laravel-installer)

- [About](#about)
- [Requirements](#requirements)
- [Installation](#installation)
- [Routes](#routes)
- [Usage](#usage)
- [Contributing](#contributing)
- [Help](#help)
- [Screenshots](#screenshots)
- [License](#license)

## About

Do you want your clients to be able to install a Laravel project just like they do with WordPress or any other CMS?
This Laravel package allows users who don't use Composer, SSH etc to install your application just by following the setup wizard.
The current features are :

- Check For Server Requirements.
- Check For Folders Permissions.
- Ability to set database information.
- Migrate The Database.
- Seed The Tables.
- Check For Server Requirements.
- Check For Folders Permissions.
- Ability to set database information.
- Migrate The Database.
- Seed The Tables.

## Requirements

* [Laravel 5.1, 5.2, 5.3, 5.4 or newer](https://laravel.com/docs/installation)

If you have any suggestions please let me know : https://github.com/RachidLaasri/LaravelInstaller/pulls.

## Installation

First, pull in the package through Composer.
1. From your projects root folder in terminal run:

```
"require": {
"rachidlaasri/laravel-installer": "2.0"
}
```bash
composer require rachidlaasri/laravel-installer
```

And then run :
2. Register the package with laravel in `config/app.php` under `providers` with the following:

```
composer update
```php
'providers' => [
RachidLaasri\LaravelInstaller\Providers\LaravelInstallerServiceProvider::class,

];
```

After that, include the service provider within `config/app.php`.
3. Publish the packages views, config file, assets, and language files by running the following from your projects root folder:

```bash
php artisan vendor:publish --tag=laravelinstaller
```
'providers' => [
RachidLaasri\LaravelInstaller\Providers\LaravelInstallerServiceProvider::class,
];
```

You can't figure it out? You need more help? Here is a video tutorial for you : [Laravel Installer by Devdojo](https://www.youtube.com/watch?v=Jput5doFYLg)
## Routes

* `/install`
* `/update`

## Usage

Before using this package you need to run :
```bash
php artisan vendor:publish --provider="RachidLaasri\LaravelInstaller\Providers\LaravelInstallerServiceProvider"
```
* **Install Routes Notes**
* In order to install your application, go to the `/install` route and follow the instructions.
* Once the installation has ran the empty file `installed` will be placed into the `/storage` directory. If this file is present the route `/install` will abort to the 404 page.

You will notice additional files and folders appear in your project :
* **Update Route Notes**
* In order to update your application, go to the `/update` route and follow the instructions.
* The `/update` routes countes how many migration files exist in the `/database/migrations` folder and compares that count against the migrations table. If the files count is greater then the `/update` route will render, otherwise, the page will abort to the 404 page.

- `config/installer.php` : In here you can set the requirements along with the folders permissions for your application to run, by default the array cotaines the default requirements for a basic Laravel app.
- `public/installer/assets` : This folder contains a css folder and inside of it you will find a `main.css` file, this file is responsible for the styling of your installer, you can overide the default styling and add your own.
- `resources/views/vendor/installer` : This folder contains the HTML code for your installer, it is 100% customizable, give it a look and see how nice/clean it is.
- `resources/lang/en/installer_messages.php` : This file holds all the messages/text, currently only English is available, if your application is in another language, you can copy/past it in your language folder and modify it the way you want. If you wanna help us provide more languages for this awesome package please send a pull request https://github.com/RachidLaasri/LaravelInstaller/pulls.

## Installing and updating your application
* Additional Files and folders published to your project :

In order to install your application, go to the `/install` route and follow the instructions.
|File|File Information|
|:------------|:------------|
|`config/installer.php`|In here you can set the requirements along with the folders permissions for your application to run, by default the array cotaines the default requirements for a basic Laravel app.|
|`public/installer/assets`|This folder contains a css folder and inside of it you will find a `main.css` file, this file is responsible for the styling of your installer, you can overide the default styling and add your own.|
|`resources/views/vendor/installer`|This folder contains the HTML code for your installer, it is 100% customizable, give it a look and see how nice/clean it is.|
|`resources/lang/en/installer_messages.php`|This file holds all the messages/text, currently only English is available, if your application is in another language, you can copy/past it in your language folder and modify it the way you want.|

In order to update your application, go to the `/update` route and follow the instructions.
## Contributing

* If you have any suggestions please let me know : https://github.com/RachidLaasri/LaravelInstaller/pulls.
* Please help us provide more languages for this awesome package please send a pull request https://github.com/RachidLaasri/LaravelInstaller/pulls.

## Help

* Cannot figure it out? Need more help? Here is a video tutorial: [Laravel Installer by Devdojo](https://www.youtube.com/watch?v=Jput5doFYLg)

## Screenshots

![Laravel web installer](http://i.imgur.com/3vYBPLn.png)

## License

Laravel Web Installer is licensed under the MIT license. Enjoy!
1 change: 0 additions & 1 deletion src/Config/installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
|
*/
'permissions' => [
'storage/app/' => '775',
'storage/framework/' => '775',
'storage/logs/' => '775',
'bootstrap/cache/' => '775'
Expand Down
8 changes: 6 additions & 2 deletions src/Controllers/WelcomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@

namespace RachidLaasri\LaravelInstaller\Controllers;

use Illuminate\Routing\Controller;
use App\Http\Controllers\Controller;

use Illuminate\Http\Request;

class WelcomeController extends Controller
{

/**
* Display the installer welcome page.
*
* @return \Illuminate\View\View
* @return \Illuminate\Http\Response
*/
public function welcome()
{
return view('vendor.installer.welcome');
}

}
File renamed without changes.
19 changes: 8 additions & 11 deletions src/Providers/LaravelInstallerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,18 @@ class LaravelInstallerServiceProvider extends ServiceProvider
public function register()
{
$this->publishFiles();

$this->loadRoutesFrom(__DIR__.'/../routes.php');
$this->loadRoutesFrom(__DIR__.'/../routes/web.php');
}

/**
* Bootstrap the application events.
*
* @param Router $router
* @param $void
*/
public function boot(Router $router)
{
$router->pushMiddlewareToGroup('web', RedirectInstall::class);
$router->middlewareGroup('install',[
CanInstall::class
]);
$router->middlewareGroup('install',[CanInstall::class]);
$router->middlewareGroup('update',[CanUpdate::class]);
}

/**
Expand All @@ -50,18 +47,18 @@ protected function publishFiles()
{
$this->publishes([
__DIR__.'/../Config/installer.php' => base_path('config/installer.php'),
]);
], 'laravelinstaller');

$this->publishes([
__DIR__.'/../assets' => public_path('installer'),
], 'public');
], 'laravelinstaller');

$this->publishes([
__DIR__.'/../Views' => base_path('resources/views/vendor/installer'),
]);
], 'laravelinstaller');

$this->publishes([
__DIR__.'/../Lang' => base_path('resources/lang'),
]);
], 'laravelinstaller');
}
}
66 changes: 66 additions & 0 deletions src/Routes/web.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php

Route::group(['prefix' => 'install','as' => 'LaravelInstaller::','namespace' => 'RachidLaasri\LaravelInstaller\Controllers','middleware' => ['web', 'install']], function() {
Route::get('/', [
'as' => 'welcome',
'uses' => 'WelcomeController@welcome'
]);

Route::get('environment', [
'as' => 'environment',
'uses' => 'EnvironmentController@environment'
]);

Route::post('environment/save', [
'as' => 'environmentSave',
'uses' => 'EnvironmentController@save'
]);

Route::get('requirements', [
'as' => 'requirements',
'uses' => 'RequirementsController@requirements'
]);

Route::get('permissions', [
'as' => 'permissions',
'uses' => 'PermissionsController@permissions'
]);

Route::get('database', [
'as' => 'database',
'uses' => 'DatabaseController@database'
]);

Route::get('final', [
'as' => 'final',
'uses' => 'FinalController@finish'
]);

});

Route::group(['prefix' => 'update','as' => 'LaravelUpdater::','namespace' => 'RachidLaasri\LaravelInstaller\Controllers','middleware' => 'web'],function() {
Route::group(['middleware' => 'update'], function() {

Route::get('/', [
'as' => 'welcome',
'uses' => 'UpdateController@welcome'
]);

Route::get('overview', [
'as' => 'overview',
'uses' => 'UpdateController@overview'
]);

Route::get('database', [
'as' => 'database',
'uses' => 'UpdateController@database'
]);
});

// This needs to be out of the middleware because right after the migration has been
// run, the middleware sends a 404.
Route::get('final', [
'as' => 'final',
'uses' => 'UpdateController@finish'
]);
});
46 changes: 46 additions & 0 deletions src/assets/css/sass/_variables.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//colors
$color_0: #ff0
$color_1: #000
$color_2: silver
$color_3: #666
$color_4: #111
$color_5: #1d73a2
$color_6: #175c82
$color_7: rgba(0, 0, 0, .19)
$color_8: rgba(0, 0, 0, .23)
$color_9: #357295
$color_10: #fff
$color_11: #cacfd2
$color_12: #34a0db
$color_13: rgba(0, 0, 0, .12)
$color_14: rgba(0, 0, 0, .24)
$color_15: #2490cb
$color_16: #eee
$color_17: #222
$color_18: rgba(0, 0, 0, .16)
$color_19: #2ecc71
$color_20: #e74c3c
$color_21: #f5f5f5
$color_22: rgba(0, 0, 0, .2)

//fonts
$font_0: Ionicons
$font_1: sans-serif
$font_2: monospace
$font_3: Roboto
$font_4: Helvetica Neue
$font_5: Helvetica
$font_6: Arial
$font_7: Courier New
$font_8: Courier
$font_9: Lucida Sans Typewriter
$font_10: Lucida Typewriter

//urls
$url_0: url(https://fonts.googleapis.com/css?family=Roboto:400,300,500,700,900)
$url_1: url(../fonts/ionicons.eot?v=2.0.1)
$url_2: url(../fonts/ionicons.eot?v=2.0.1#iefix)
$url_3: url(../fonts/ionicons.ttf?v=2.0.1)
$url_4: url(../fonts/ionicons.woff?v=2.0.1)
$url_5: url(../fonts/ionicons.svg?v=2.0.1#Ionicons)
$url_6: url(../img/background.png)
Loading

0 comments on commit d4ea4e7

Please sign in to comment.