Featured image of post A Several Laravel tips

A Several Laravel tips

There was an error in opening the project

try Composer update OR Composer i

Composer version update

To update to 2.0 just execute the following command

1
composer self-update --2

Go back to version 1.10.10 with composer self-update –rollback

1
composer self-update --1

The webpage displays Debug mode

laravel/config/app.php

‘debug’ => (bool) env(‘APP_DEBUG’, false),

->

‘debug’ => (bool) env(‘APP_DEBUG’, true),


To install XML suite

1
composer require mtownsend/response-xml

To install the SQl Server Reporting Servers suite

1
composer require chartblocks/php-ssrs

Encountered Fatal error: Class ‘SoapClient’ not found

  1. Go to php.ini in C:/xampp/php
  2. In front of extension=soap; just remove it

Encountered In ProviderRepository.php line 208: Class ‘Elibyy\TCPDF\ServiceProvider’ not found

1
composer require elibyy/tcpdf-laravel

##PostgreSQL

https://tonyfrenzy.medium.com/using-postgresql-with-laravel-c4c320ca7f34


Encountered the following errors:

Your requirements could not be resolved to an installable set of packages.

Problem 1 - laravel/framework[v7.29.0, …, 7.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0, …, 1.x-dev]. - Root composer.json requires laravel/framework ^7.29 -> satisfiable by laravel/framework[v7.29.0, …, 7.x-dev].

To enable extensions, verify that they are enabled in your .ini files: - C:\php-8.0.6\php.ini You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

You must do the following:

First of all, stop the XAMPP/Wamp and then kindly remove the starting semicolon ( ; ) from your xampp\php\php.ini the following code.

;extension=fileinfo


encountered the following problems:

Undefined constant PDO::MYSQL_ATTR_LOCAL_INFILE

You must do the following

In your php.ini file, you should have the following line (uncommented):

extension=php_pdo_mysql.dll on Windows extension=php_pdo_mysql.so on Linux/Mac


laravel nginx ubuntu server

https://blog.gtwang.org/linux/ubuntu-linux-laravel-nginx-mariadb-installation-tutorial/


Laravel Visual Studio Code Alt+Shift+F for blade

Need to install plugin

Laravel Blade Snippets and Beautify

MAC top column -> Preferences -> Settings (shortcut) control+option+command+ㄝ

Windows File->Preferences->Settings (shortcut) Ctrl+,

Search “beautify” –> “click” Edit in settings:json

slide to the bottom Copy and paste this json to the last line of settings.json

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"beautify.language":{
        "js": {
            "type": [
                "javascript",
                "json",
                "jsonc"
            ],
            "filename": [
                ".jshintrc",
                ".jsbeautifyrc"
            ]
        },
        "css": [
            "css",
            "less",
            "scss"
        ],
        "html": [
            "htm",
            "html",
            "blade"
        ]
    },
Built with Hugo
Theme Stack designed by Jimmy