Post Thumbnail

Installing breeze

I want to install Laravel Breeze on laravel 9 project but this is the error message I have been getting .How can i solve this please

0 Comments
Answered
Post Thumbnail

Regarding decimal number

create request form code:-public function rules(): array    {        //dd('coming');        return [            'station_id' => ['required',                    function ($attribute, $value, $fail) {                        if ($value == 0) {                            $fail("Please Select Station");                        }                    }],            'NO' => ['required', 'regex:/^\d{1,3}(\.\d{1,3})?$/'],            'NO2' => ['required', 'between:0,99.99','min:1', 'max:6'],            'NOx' => ['required', 'between:0,99.99','min:1', 'max:6'],            'NH3' => ['required', 'between:0,99.99','min:1', 'max:6'],            'SO2' => ['required', 'between:0,99.99','min:1', 'max:6'],            'CO' => ['required', 'between:0,99.99','min:1', 'max:6'],            'O3' => ['required', 'between:0,99.99','min:1', 'max:6'],            'PM25' => ['required', 'between:0,99.99','min:1', 'max:6'],            'PM10' => ['required', 'between:0,99.99','min:1', 'max:6'],            'airquality' => ['required',                function ($attribute, $value, $fail) {                    if ($value == 0) {                        $fail("Please Select Airquality");                    }                }],            'AQI' => ['required','min:2','max:3'],            //'AQI' => ['required','min:2','max:3','regex:/^\d{3}$/'],            //'AQI' => ['required|numeric|max:3', 'regex:/^\d+(\.\d{1,2})?$/'],            'status' => ['required','boolean']        ];    }    public function messages()    {        return [            'NO.required' => 'NO field is required and should be decimal.',            'NO2.required' => 'NO2 field is required and should be decimal.',            'NOx.required' => 'NOx field is required and should be decimal.',            'NH3.required' => 'NH3 field is required and should be decimal.',            'SO2.required' => 'SO2 field is required and should be decimal.',            'CO.required' => 'CO field is required and should be decimal.',            'O3.required' => 'O3 field is required and should be decimal.',            'PM25.required' => 'PM25 field is required and should be decimal.',            'PM10.required' => 'PM10 field is required and should be decimal.',            'AQI.required' => 'AQI field is required and should be decimal.',        ];    }Controller:-public function store(CreateRequest $request)    {       try{        //$validatedData = $request->validated();            DB::beginTransaction();            Airquality::create([                'station_id' => $request->station_id,                'NO' => $request->NO,                'NO2' => $request->NO2,                'NOx' => $request->NOx,                'NH3' => $request->NH3,                'SO2' => $request->SO2,                'CO' => $request->CO,                'O3' => $request->O3,                'PM25' => $request->PM25,                'PM10' => $request->PM10,                'airquality' => $request->airquality,                'AQI' => $request->AQI,                'status' => $request->status            ]);            DB::commit();        }        catch(\Exception $ex){            DB::rollback();            dd($ex->getMessage());        }        session()->flash('alert-success', 'Airquality Created Successfully');        return to_route('airqualities.index');    }

2 Comments
Solved
Post Thumbnail

Api for laravel or any other web

 i want to ask that if we want to make APIs or REST APIs , we will have to make seperate API for each web or one API is sufficient for each Website

1 Comment
Solved
Post Thumbnail

Laravel 10 full calender ajax call is giving server error

1. My Event creation is showing me request array, i need to refresh the page for checking the  event generated, showing the server error as well.2. Event drop is not working showing the server error.3. when i want to edit the event using eventclick , it is creating a new event instead of editing the current event and also showing the server error.attaching the screenshot of controller code.

0 Comments
Answered
Post Thumbnail

Composer require maatwebsite/excel

PS C:\xampp\htdocs\hr> composer require maatwebsite/excel                       Info from https://repo.packagist.org: #StandWithUkraine./composer.json has been updatedRunning composer update maatwebsite/excelLoading composer repositories with package informationUpdating dependenciesNothing to modify in lock fileInstalling dependencies from lock file (including require-dev)Package operations: 1 install, 38 updates, 0 removals    Failed to download symfony/polyfill-ctype from dist: The zip extension and unzip/7z commands are both missing, skipping.The php.ini used by your command-line PHP is: C:\xampp\php\php.ini    Now trying to download from source  - Syncing symfony/polyfill-ctype (v1.28.0) into cache    Failed to download symfony/polyfill-php80 from dist: The zip extension and unzip/7z commands are both missing, skipping.The php.ini used by your command-line PHP is: C:\xampp\php\php.ini    Now trying to download from source  - Syncing symfony/polyfill-php80 (v1.28.0) into cache    Failed to download symfony/polyfill-php83 from dist: The zip extension and unzip/7z commands are both missing, skipping.The php.ini used by your command-line PHP is: C:\xampp\php\php.ini    Now trying to download from source  - Syncing symfony/polyfill-php83 (v1.28.0) into cache    Failed to download symfony/polyfill-mbstring from dist: The zip extension and unzip/7z commands are both missing, skipping.The php.ini used by your command-line PHP is: C:\xampp\php\php.ini    Now trying to download from source  - Syncing symfony/polyfill-mbstring (v1.28.0) into cache    Failed to download symfony/http-foundation from dist: The zip extension and unzip/7z commands are both missing, skipping.The php.ini used by your command-line PHP is: C:\xampp\php\php.ini    Now trying to download from source  - Syncing symfony/http-foundation (v6.3.4) into cache    Failed to download guzzlehttp/psr7 from dist: The zip extension and unzip/7z commands are both missing, skipping.The php.ini used by your command-line PHP is: C:\xampp\php\php.ini    Now trying to download from source  - Syncing guzzlehttp/psr7 (2.6.1) into cache    Failed to download guzzlehttp/guzzle from dist: The zip extension and unzip/7z commands are both missing, skipping.The php.ini used by your command-line PHP is: C:\xampp\php\php.ini    Now trying to download from source  - Syncing guzzlehttp/guzzle (7.8.0) into cache    Failed to download guzzlehttp/uri-template from dist: The zip extension and unzip/7z commands are both missing, skipping.The php.ini used by your command-line PHP is: C:\xampp\php\php.ini    Now trying to download from source  - Syncing guzzlehttp/uri-template (v1.0.2) into cache    Failed to download laravel/pint from dist: The zip extension and unzip/7z commands are both missing, skipping.The php.ini used by your command-line PHP is: C:\xampp\php\php.ini    Now trying to download from source  - Syncing laravel/pint (v1.13.1) into cache

0 Comments
Solved