When creating a relation hasOne or HasMany does the name of the function in the model matters or not?

|
stvjeanb 2020-07-09 19:21:33
hello every one
isofdev 2020-07-09 19:21:46
…. 2020-07-09 19:20:02
I mean, delete them all except root user

No it’s good like that

stvjeanb 2020-07-09 19:21:51
I am new in Laravel and happy to find that usenet
stvjeanb 2020-07-09 19:22:24
I hope I can find all I will need to help me improve my Laravel skills
…. 2020-07-09 19:28:09
isofdev 2020-07-09 19:21:46
No it’s good like that

laravel_discuss-44382.jpg
Should I leave it like this

isofdev 2020-07-09 19:28:28
…. 2020-07-09 19:28:09
Should I leave it like this

Yeah

isofdev 2020-07-09 19:30:04
…. 2020-07-09 19:28:09
Should I leave it like this

Check if the problem is fixed

…. 2020-07-09 19:30:46
laravel_discuss-44385.jpg
I will delete all the databases and make databases again is that true
isofdev 2020-07-09 19:31:57
Don’t delete anything here
Make just your new database
…. 2020-07-09 19:32:13
Ok
…. 2020-07-09 19:33:30
But I do not want to make the previous mistake What I do
isofdev 2020-07-09 19:35:34
…. 2020-07-09 19:33:30
But I do not want to make the previous mistake What I do

Create a new database, configure env file and run migrations

…. 2020-07-09 19:35:45
Ok
…. 2020-07-09 19:37:46
laravel_discuss-44391.jpg
I want check all of them in global privileges
…. 2020-07-09 19:38:14
I want check all of them in global privileges for all users
Ok
isofdev 2020-07-09 19:39:36
…. 2020-07-09 19:37:46
I want check all of them in global privileges

This config is Ok Buddy

…. 2020-07-09 19:40:01
Ok
…. 2020-07-09 19:41:57
thank you very much
isofdev 2020-07-09 19:42:56
…. 2020-07-09 19:41:57
thank you very much

Welcome

giorbismiguel 2020-07-09 19:48:30
web_artisan77 2020-07-09 19:05:14
When creating a relation hasOne or HasMany does the name of the function in the model matters or not?

matter

web_artisan77 2020-07-09 19:52:56
giorbismiguel 2020-07-09 19:48:30
matter

Why?

web_artisan77 2020-07-09 19:55:50
The problem is that tinks says the method doesnt exist 😐 but it does!
web_artisan77 2020-07-09 19:56:03
web_artisan77 2020-07-09 19:55:50
The problem is that tinks says the method doesnt exist 😐 but it does!

*Tinker

giorbismiguel 2020-07-09 19:56:56
For example if you have a foreign key with the name user_id and the relationship is BelongTo
giorbismiguel 2020-07-09 19:57:15
the name of the relationship can be for user(){}
giorbismiguel 2020-07-09 19:57:45
if the name is employee for example
giorbismiguel 2020-07-09 19:58:17
you could specify the secound parameter of the relationship
giorbismiguel 2020-07-09 19:58:28
example
giorbismiguel 2020-07-09 19:59:29
public function employee() { return $this->belongsTo(Article:class, ‘user_id’)}
giorbismiguel 2020-07-09 19:59:58
web_artisan77 2020-07-09 19:56:03
*Tinker

Do you understand?

giorbismiguel 2020-07-09 20:00:23
show me the code, it’s better
web_artisan77 2020-07-09 20:04:34
sorry, I’ve already solved it
web_artisan77 2020-07-09 20:04:57
with this: `php artisan clear-compiled`
giorbismiguel 2020-07-09 20:05:11
ohh, very good
web_artisan77 2020-07-09 20:05:26
thank you anyways 😀
giorbismiguel 2020-07-09 20:05:28
don optimize your code in enviroment dev
web_artisan77 2020-07-09 20:07:42
giorbismiguel 2020-07-09 20:05:28
don optimize your code in enviroment dev

dont?

focalfossa20 2020-07-09 20:53:14
laravel_discuss-44417.jpg
I’m getting blank data when im hit this api endpoint, whats wrong with my code?,
focalfossa20 2020-07-09 20:53:37
https://pastebin.com/i0femRu1 this is my code

public function tampilPertanyaanIps(){// $chapters = DailyTest::where([ – Pastebin.comPastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
sahilbalgotra 2020-07-09 20:55:49
How we can send mail through local in window
…. 2020-07-09 21:06:25
isofdev 2020-07-09 19:39:36
This config is Ok Buddy

laravel_discuss-44420.jpg
Say , could not find driver

andcarpi 2020-07-09 21:16:25
your pdo or pdo_mysql are not installed
…. 2020-07-09 21:28:20
I installed laragon
How install pdo or pdo_mysql
giorbismiguel 2020-07-09 21:33:19
web_artisan77 2020-07-09 20:07:42
dont?

yes, don’t

cayetanohosma 2020-07-09 21:43:01
…. 2020-07-09 21:28:20
I installed laragon
How install pdo or pdo_mysql

Modifying the Dockerfile or connect to ssh to the server and use apt-get or yum or dpkg, depending on the Linux Distribution

…. 2020-07-09 21:57:35
cayetanohosma 2020-07-09 21:43:01
Modifying the Dockerfile or connect to ssh to the server and use apt-get or yum or dpkg, depending on the Linux Distribution

My system is windows

cayetanohosma 2020-07-09 22:02:08
Are you running all in Windows, right?
…. 2020-07-09 22:02:23
Ok
…. 2020-07-09 22:02:42
I will doing
cayetanohosma 2020-07-09 22:03:07
Did you enable the php_pdo_mysql.dll extension?
|