文章

顯示從 4月, 2023 起發佈的文章

Class 'Inertia\Inertia' not found

  php artisan jetstream:install inertia

'php artisan migrate' Error:Class 'App\Providers\Schema' not found

  In the AppServiceProvider.php, you did not include the necessary use statement at the top of the file. Copy use Illuminate \ Support \ Facades \ Schema ;

How do I remove the branding from tinymce? (Where it says 'Powered by tinymce')

  tinymce.init({ selector: '#tinymce', branding: false });

check laravel version

  php artisan --version   Laravel Framework 9.43.0

vue 2 tinymce version

npm i @tinymce/tinymce-vue@2.1.0 npm i tinymce@5.0.7

How to fix the error "You may need an appropriate loader to handle this file type"

  webpack.mix.js use  .vue() const mix = require ( 'laravel-mix' ); /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel applications. By default, we are compiling the CSS | file for the application as well as bundling up all the JS files. | */ mix. js ( 'resources/js/app.js' , 'public/js' ) . vue () . postCss ( 'resources/css/app.css' , 'public/css' , [ // ]); ref link  https://laravel-mix.com/docs/6.0/upgrade

laravel create Controller command

  php artisan make:controller CustomersController --model=Customer

[webpack-cli] Failed to load .....\node_modules\laravel-mix\setup\webpack.config.js' config

  npm install laravel-mix@latest

XAMPP Virtual Host

 C:\xampp\apache\conf\extra\httpd-vhosts.conf Listen 81 <VirtualHost *:81>     ServerAdmin webmaster@dummy-host2.example.com     DocumentRoot "C:\Users\news5\Documents\GitHub\active-ecommerce-cms-styled\active-ecommerce-cms"     ServerName dummy-host2.example.com     ErrorLog "logs/dummy-host2.example.com-error.log"     CustomLog "logs/dummy-host2.example.com-access.log" common     <Directory "C:\Users\news5\Documents\GitHub\active-ecommerce-cms-styled\active-ecommerce-cms" >         Options Indexes FollowSymLinks MultiViews         AllowOverride all         Order Deny,Allow         Allow from all         Require all granted </Directory> </VirtualHost>

Laravel Model::create or Model->save()

  Laravel Model::create or Model->save() Ask Question Asked   8 years, 4 months ago Modified   8 years, 4 months ago Viewed  30k times 19 I'm wondering what approach should I use for storing data in the database; First approach $product = Product :: create ( $request -> all ()); In my Product model I have my $filable array for mass assigment Second approach $product = new Product (); $product ->title = $request ->title; $product ->category = $request ->category; $product -> save (); Is any of these two "Better solution"? What should I generally use? Thank you for you advice

Laravel Mix unknown option '--hide-modules' error

  Remove --hide-modules from your package.json and than run npm run dev it will run without erros.