i use laravel framework in my project
i downloaded the package laravel-authentication-acl
1-Add to composer.json require field the following lines:
"require": {
...
"jacopo/laravel-authentication-acl": "1.1.*"
},
2- run composer update command.
3- opend the file app/config/app.php
and added to the 'providers' option the following line:
'Jacopo\Authentication\AuthenticationServiceProvider',
4-Then run
this command to publish the configuration files:
php artisan authentication:prepare
5- run the command:
php artisan authentication:install.
6- copy
D:\xamp\htdocs\halls\vendor\jacopo\laravel-authentication-acl\public
into D:\xamp\htdocs\halls\public\packages\jacopo
7- run this command
to publish the configuration files:
php artisan authentication:prepare
8- run the command:
php artisan authentication:install
when i examin the source of the files in browser
for example
http://halls.me/packages/jacopo/laravel-authentication-acl/css/style.css
and click of it it shows Whoops, looks like something went wrong.
that means that the browser not read assets files any help ?
Well, if you copied:
D:\xamp\htdocs\halls\vendor\jacopo\laravel-authentication-acl\public into D:\xamp\htdocs\halls\public\packages\jacopo
You should access your files not using:
http://halls.me/packages/jacopo/laravel-authentication-acl/css/style.css
but
http://halls.me/packages/jacopo/css/style.css
Related
Laravel "php artisan vendor:publish" not creating the config file from the package to be copied over to the main project if the file already exist. My problem is that I usually update some configs in my package and running the vendor:publish doesn't copy the file to the main app because I previously executed the command.
php artisan vendor:publish --help would show you the help information for the command. First option is
--force Overwrite any existing files
So use
php artisan vendor:publish --force
to ... overwrite existing files.
After Successfully install laravel 5 When I try to update composer or install any laravel packages via composer getting this error
Artisan file is missing. Download the artisan file. If not work download bootstrap folder & replace into your bootstrap folder.
See: How do I download a particular file from GitHub?
I installed selenium on Laravel by composer running following command
composer require modelizer/selenium "~1.0"
And added below listed code block to register Service provider Modelizer\Selenium\SeleniumServiceProvider::class in app.php
$app->singleton(
Modelizer\Selenium\SeleniumServiceProvider::class
);
Set configuration to .env file.
APP_URL="http://example.dev/"
SELENIUM_WIDTH=1024
SELENIUM_HEIGHT=768
Cleared laravel configuration cache file.
$php artisan config:clear
But when I tried to start the selenium server by using command php artisan selenium:start I got the following error.
[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the "selenium" namespace.
Please help me to get rid from this issue.
I don't think there a need to add
$app->singleton(
Modelizer\Selenium\SeleniumServiceProvider::class
);
because you already registered Modelizer\Selenium\SeleniumServiceProvider::class in app.php file
Regarding php artisan add modelizer/selenium will work when you add https://github.com/Qafeen/Manager package
Try running below commands:
php artisan add modelizer/selenium
php artisan selenium:start
I want to make use of auth system which comes with the laravel package but the problem is when I make new laravel package using composer i.e composer create-project laravel/laravel project name --prefer-dist
it do not install those auth resources which includes (i.e. auth folder inside resources > views) and also I can't find the Services Folder inside app directory.
All other things are working fine except this authentication system.
What can be the possible problems? Please give me solution
I am working with MAMP.
Taylor Otwell has made it opt-in for Laravel 5.1
You need to run following command after installation
php artisan scaffold:auth
UPDATE
I think this has been answered here
You could also run the command php artisan make:auth in the root directory of you laravel project. I had the same problem and it worked for me.
The command php artisan scaffold:auth didn't work for me i don't know why.
it issued the error:
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "auth" is not defined.
Did you mean this?
make:auth
in Laravel 5.2 you just have to run this command "php artisan make:auth" and the auth folder will be created
Since laravel 6.* version make:auth is no longer supported, use ui:auth instead.
For deploying ui pack run
composer require laravel/ui --dev
then update composer.json :
composer update -W
and do the:
php artisan ui:auth
You need execute
php artisan make:auth
now if your style css and js are missing
You need load file .css and .js
1) execute in your project
npm install
2) then execute
npm run dev => now in folder /public now exist folder js and css
3) reload page
I created a new project via composer in Laravel 5.1.
I couldn't find the app.blade.php.and home.blade.php file, what am I doing wrong?
You didn't do anything wrong.
The Auth Scaffolding was removed from Laravel 5.1. That includes the app.blade.php and the home.blade.php that you mentioned.
However, you'll still be able to get it back with the Scafold Package :
1.Add Scafold to your composer.json file in the require : section :
require : {
"laravel/framework": "5.1.*",
"bestmomo/scafold": "dev-master"
}
or type from terminal :
composer require bestmomo/scafold dev-master
2.Update composer :
composer update
3.Add the service provider to your config/app.php :
Bestmomo\Scafold\ScafoldServiceProvider::class,
4.Publish the views and assets :
php artisan vendor:publish
Done!
Run php artisan make:auth and it will automatically generate layoyts\app.blade.php and home.blade.php
If you want to use laravel 5.0 you can download it from their repo here:
https://github.com/laravel/laravel/tree/5.0
And here is a video showing how to get started:
https://scotch.io/tutorials/login-with-the-built-in-laravel-5-scaffolding
Basically just
1) run composer install to get the dependencies then
2) run artisan key:generate to generate your random key for .env file.
3) set your database info in .env file
4) run artisan migrate to set up the database
and you should be set