I want to use laravel administrator for cms in laravel 5 but after php artisan vendor:publish when i want to publish assets packages an exception occur that says there are no commands defined in the "asset" namespace here is my command
php artisan asset:publish frozennode/administrator
for any help and guide thanks.
To install Administrator as a Composer package to be used with Laravel 5, simply add this to your composer.json:
"frozennode/administrator": "5.*"
and run composer update Once it's installed, you can register the service provider in config/app.php in the providers array:
'providers' => [
'Frozennode\Administrator\AdministratorServiceProvider',
]
Then publish Administrator's assets with php artisan vendor:publish.
This will add the file config/administrator.php. This config file is the primary way you interact with Administrator. This command will also publish all of the assets, views, and translation files.
Related
WE are building a laravel application with crud operations , as per the backpack documentation i understood how to create a module using the command
php artisan make:migration:schema create_tags_table --model=0 --schema="name:string:unique,slug:string:unique"
php artisan migrate
STEP 2. create crud
php artisan backpack:crud tag
is there any way that i can create a new module with required columns through admin panel itself.
No, as far as I know, Backpack for Laravel doesn't have a way to create cruds from the panel itself. but you can call commands from your own controllers.
for example:
Artisan::call('backpack:crud tag');
take a look at the documentation here:
https://laravel.com/docs/7.x/artisan#programmatically-executing-commands
I have a composer typo3 (8.7.30) project, but somehow the extension-manager does not show up.
I tried the following:
./vendor/bin/typo3 extensionmanager:extension:install extensionmanager
./vendor/bin/typo3cms extension:activate extensionmanager
./vendor/bin/typo3cms extension:setup extensionmanager
My user has admin rights and I can see other admin tools. I also tried to create a new admin with the install tool and the new user had the same "problem".
Other modules - including custom ones - are showing up.
Any ideas on how to tackle this?
Edit: When I install the project step by step without generating the package state it's working fine, but the moment I generate package states the extension manager is missing - even though the entry in the PackageStates.php
One userTsConfig.ts disabled the module in the production context. I didn't check for it because the behavior was new for me. It was neither a typo3 or composer problem, just a configuration issue.
After installing from your composer.json, the extension manager is available.
I guess that your PackageStates.php just somehow misses the extensionmanager:
'extensionmanager' => [
'packagePath' => 'typo3/sysext/extensionmanager/',
],
If I manually remove that section, vendor/bin/typo3cms install:generatepackagestates (from the package helhum/typo3-console which you already have installed) would regenerate it.
I have a table in the database which has a large number of columns. I know that EasyAdminBundle is out there and I used it in the past to create forms based on database tables. How can create this based on Entity? So that I can generate the forms automatically and no populate them manually.
You can use the Symfony Maker Bundle. With this bundle, you can generate code if you are using a version of Symfony later than 3.4. For older versions you can use Sensio Generator Bundle.
In your case, install the Maker Bundle with composer:
composer require symfony/maker-bundle --dev
Then run this command (and follow the steps) to create your form:
php bin/console make:form
To see all make commands you can use, run php bin/console list make
As symfony 4.4 you can do :
./bin/console make:entity YourFormType \\Your\\Path\\To\\Entity
From the command help :
Description:
Creates a new form class
Usage:
make:form [ <name> [<bound-class>]]
I want yo make tables in postgresql with inherits, I foundes this http://packalyst.com/packages/package/thibaud-dauce/postgresql-schema form laravel 4.2, but it does not work whith laravel 5.2.
It shows me:
[Symfony\Component\Debug\Exception\FatalThrowableError] Fatal error: Class ThibaudDauce\PostgresqlSchema\PostgresqlSchemaServiceProvider' not found
when i try with composer update.
Could you help me please?
You can pull in this package https://packagist.org/packages/rishi-ramawat/laravel-postgresql-inherit via composer like this for using it with Laravel 5.2.* & 5.3.* :
composer require "rishi-ramawat/laravel-postgresql-inherit ~2.1.0"
This is a package which I maintain and it currently supports Laravel 5.2.*, 5.3.* & 5.4.*
For Laravel 5.4.* you would have to do:
composer require "rishi-ramawat/laravel-postgresql-inherit ~2.2"
Please read the README of this package to find out more about the complete installation procedure.
You may run it:
DB::statement("ALTER TABLE capitals INHERIT cities;");
I want to switch to laravel 5, but have some trouble with ide - autocompletion. I'm using phpstorm.
In google, the answers always end up with suggesting to use https://github.com/barryvdh/laravel-ide-helper . But it seems like it is broken for Laravel 5.
The steps I am doing are:
Install Laravel 5
composer create-project laravel/laravel
Require ide-helper
composer require barryvdh/laravel-ide-helper
Added 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
....
'Illuminate\Translation\TranslationServiceProvider',
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
Trying to generate the helper file
artisan ide-helper:generate
But it always breaks with following error:
exception 'InvalidArgumentException' with message 'There are no commands defined in the "ide-helper" namespace.' in C:\xampp\htdocs\test\vendor\symfony\console\Symfony\Component\Console\Application.php:501
0 C:\xampp\htdocs\test\vendor\symfony\console\Symfony\Component\Console\Application.php(535): Symfony\Component\Console\Application->findNamespace('ide-helper')
1 C:\xampp\htdocs\test\vendor\symfony\console\Symfony\Component\Console
\Application.php(192): Symfony\Component\Console\Application->find('ide-helper:gene...')
2 C:\xampp\htdocs\test\vendor\symfony\console\Symfony\Component\Console\Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Outpu
t\ConsoleOutput))
3 C:\xampp\htdocs\test\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(91): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Out
put\ConsoleOutput))
4 C:\xampp\htdocs\test\artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
5 {main}
Maybe someone had the same issue and can help me.
I'm open for different solutions for autocompletion other than barryvdh's ide-helper.
I had the same problem and this fixed it:
Before you run php artisan ide-helper:generate command, make sure to php artisan clear-compiled and php artisan optimize as it's noted here. If this didn't fixed your problem, take a look at this and clean out PhpStorm cache by choosing this:
File | Invalidate Caches/Restart
After auto restarting, PhpStorm will index again and everything should work fine.
Sorry for my bad english.
Edited: After these steps import your Facades like this use Illuminate\Support\Facades\Auth link them inside your _ide_helper.php file like use Auth.
I ran into the same problem. These are the steps I took to fix it:
I double-checked that 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider' was correctly added to the providers array in config/app.php.
I executed artisan clear-compiled. Had no effect
Executing php artisan config:clear fixed the problem.
This error occur when the package ServiceProvider isn't loaded.
If you have multiple config file (like for different environment), you must ensure that the service provider is well set in all the environment you which to use the package.
config/
local/
app.php
app.php
to verify if the service provider is correctly set to your application you can dump the app config:
dd(\Config::get('app.providers'));
Try this:
php artisan ide-helper:generate
Here is an updated gist as of this month. I have tested this and it works in PHPStorm.
Also you don't have to install this through composer. Copy the gist and save it in your root folder as _ide_helper.php.