Laravel PictureWorks package
Very simple legacy work. Wrapped in a neat Laravel ready package.
Source legacy files in /legacy.
-
Set up your Laravel website.
laravel new <your_website>
-
Ideally, this package should be in its own Composer package repository. If you want to keep your packages private, you can use packagist.com. But because this particular package wouldn't be useful for the general public anyway, we can set things up locally.
Clone the package repo.
git clone https://github.com:firebender/laravel-pictureworks.git
-
cd into laravel-pictureworks, then run
composer install
-
In the new Laravel website's composer.json, add the following:
"repositories": [ { "type": "path", "url": "<path_to_this_package>" } ]
-
Pull the package into your Laravel app.
composer require firebender/laravel-pictureworks:dev-master
-
Create your database and update your .env.
DB_DATABASE=your_database_name DB_USERNAME=your_database_username DB_PASSWORD=your_database_password
-
Migrate
artisan migrate
-
Optional. Seed the database with either:
This way:
artisan db:seed --class=FireBender\\Laravel\\PictureWorks\\Database\\Seeders\\UserSeeder
Or this way:
artisan z:seed N // where N is the number of records you wish to seed
-
Check that the web middleware group is availabe in your middleware groups in your App/Http/Kernel.php file. In particular, ensure that the following middleware classes are activated:
\Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class,
List of users
users/{page?}
View specific user
user/{id}
Edit/Modify a user entry
user/edit/{id}
Shows users in paged format
artisan z:users:get {--page=} {--per-page=} {--seed=}
Seeds users table
artisan z:seed <count>
Displays a user by specified user id
artisan z:user:get <id>
Modifies a user entry
artisan z:user:modify <id> {--name=} {--comments=}
Adds a user entry. Interactive
artisan z:user:add
Modifies comments on a user entry
artisan z:comments:modify <id> <password> <comments>
Write tests. Write code. Make a pull request.
@firebender