Package Data | |
---|---|
Maintainer Username: | UnrulyNatives |
Maintainer Contact: | peter.gavagai@gmail.com (Piotr Plebaniak) |
Package Create Date: | 2016-06-07 |
Package Last Update: | 2019-05-03 |
Language: | CSS |
License: | Unknown |
Last Refreshed: | 2024-11-22 03:10:47 |
Package Statistics | |
---|---|
Total Downloads: | 451 |
Monthly Downloads: | 3 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
A set of code snippets and functions to use across all projects.
This package contains some modifications made over a fresh installation of Laravel >= 5.3.
With time, this package would contain all modifications of the bare Laravel app. In other words, as soon as you include this package in your composer.json, you will get fully working starter kit.
Gravatar for your User model
some usefull css and jQuery tools included. See the DEMO in Starter kit for details and examples: http://dev.unrulynatives.com/feature
Add
"unrulynatives/helpers": "^1.0"
to your composer.json file.
Add this to your config/app.php
file in packages section
Unrulynatives\Helpers\HelpersServiceProvider::class,
Publish views, css & jQuery files to your app:
php artisan vendor:publish --provider="Unrulynatives\Helpers\HelpersServiceProvider" --force
Should you wish to publish to app
folder only selected resources, use these commands:
public assets (js, css)
php artisan vendor:publish --provider="Unrulynatives\Helpers\HelpersServiceProvider" --tag=publicassets --force
app files: Controllers, route files, Models
php artisan vendor:publish --provider="Unrulynatives\Helpers\HelpersServiceProvider" --tag=app --force
app files: View files
php artisan vendor:publish --provider="Unrulynatives\Helpers\HelpersServiceProvider" --tag=views --force
WARNING:
app files: View files to be copied to resources/views/layouts/
folder
php artisan vendor:publish --provider="Unrulynatives\Helpers\HelpersServiceProvider" --tag=viewslayouts --force
migration files
php artisan vendor:publish --provider="Unrulynatives\Helpers\HelpersServiceProvider" --tag=migrations --force
seed files
php artisan vendor:publish --provider="Unrulynatives\Helpers\HelpersServiceProvider" --tag=seeds --force
In your User
model:
`use Unrulynatives\Helpers\UserExtensions;
class User extends Authenticatable {
use UserExtensions;`
class [your-model-name-goes-here] extends Authenticatable {
use ModelExtensions;`
\app\Providers\RouteServiceProvider.php
and$this->mapUnstarterRoutes();
to the map()
function and protected function mapUnstarterRoutes()
{
Route::group([
'middleware' => 'web',
'namespace' => $this->namespace,
], function ($router) {
require base_path('unstarter/routes/unstarter.php');
});
}
Now you can check if the package works. Point your browser to unrulyhelpers
. You should see a clock - an example developed along Laraveldaily tutorial http://laraveldaily.com/how-to-create-a-laravel-5-package-in-10-easy-steps/
<img src="{{Auth::user()->gravatar}}">