I just upgraded to laravel 8, and want to use jetstream package but i am having issues installing it. Can someone tell complete procedure of how to install Laravel 8 jetstream project via composer and …
How view file get the variable from controller?
I’m a student and new to PHP. After searching a lot i still don’t understand how the view file got the variable from controller. I got the function view() from Controller.php class. And i got a HomeController.php Extends the Controller This is inn my calc.php view file. As you can see that the cal…
Converting string to two dimensional array in php
just would like to ask how can I convert the string into two dimensional array in php. Please refer my sample code below. $coordinates = “9.499819 123.920318,9.490845 123.916563,9.484644 123….
PHP get the content after each h2 tag
I’m trying to use php to extract content after each h2 tag (and before the next h2 tag).. Example: $content = ‘
title 1
test
test</li&…
One particular id at first and after all ids in desc order
I need to get one particular id at first and, after that, all ids in descending order. This is what I have done but when I uncomment that order line it won’t work, Answer Just replace this line with your order by condition
Unable to use Laravel Factory in Tinker
I am unable Model Factory in Laravel Tinker. //ItemFactory.php class ItemFactory extends Factory { /** * The name of the factory’s corresponding model. * * @var string */ …
how to save binary type in postgresql
this is php code to save binary data (image,3dmodeling) To store 3d modeling and textures, it was a DB created to manage them in the first place. When sending and receiving a file, the file is not converted . It seems that I have a wrong understanding of bytea that this method is not working properly now, but…
foreach and for loop not getting all data from sql query
**Edited I split the sql queries into 3 and now the queries look like this. $sql_2 = “SELECT DISTINCT cr.id AS courseid, cr.fullname AS coursename, cr.idnumber AS idnumber, …
How to use class named “Case”?
I have a model class named Case in namespace App. When I try to use it I get: syntax error, unexpected ‘Case’ (T_CASE), expecting identifier (T_STRING) or ‘{‘ Source code, error is on the line with use AppCase: How to escape class name in use declaration? I’m using PHP 7.4.4 and …
Laravel 7.2, composer install, don’t install xethron/migrations-generator
I want to create a migration from existing database in Laravel 7.2. I found xethron/migrations-generator in this link. When I tried to install it I got this error: Problem 1 – xethron/migrations-…