← prev | next →
ronakjain2012 2019-04-11 22:49:09
Getting error in vue js page
http://web-tools.asia/
richitorres 2019-04-12 03:01:57
Marvixino 2019-04-11 22:41:42
Any idea why artisan ignores .env and read the vars from config?
you can use this commands: php artisan config:clear
richitorres 2019-04-12 03:02:02
php artisan config:cache
richitorres 2019-04-12 03:02:12
php artisan cache:clear
richitorres 2019-04-12 03:02:26
composer dumpautoload
richitorres 2019-04-12 03:02:52
dump-autoload
Marvixino 2019-04-12 03:06:41
richitorres 2019-04-12 03:01:57
you can use this commands: php artisan config:clear
Thanks, solved
Sagar_SS 2019-04-12 06:23:36
How can i get session array values in separate variables
okuban 2019-04-12 08:25:07
Software Developer:
Anyone knows how to solve this error :
IlluminateDatabaseQueryException : SQLSTATE[HY000]: General error: 1005 Can’t create table kenyanstalking.#sql-19cc_76 (errno: 150 “Foreign key constraint is incorrectly formed”) (SQL: alter table replies add constraint replies_question_id_foreign foreign key (`question_id`) references questions (`id`) on delete cascade)
okuban 2019-04-12 08:26:32
Migration :
Schema::table(‘replies’, function(Blueprint $table) {
$table->foreign(‘question_id’)->references(‘id’)->on(‘questions’)
->onDelete(‘cascade’);
});
2019-04-12 08:26:34
okuban 2019-04-12 08:25:07
Software Developer:
Anyone knows how to solve this error :
IlluminateDatabaseQueryException : SQLSTATE[HY000]: General error: 1005 Can’t create table kenyanstalking.#sql-19cc_76 (errno: 150 “Foreign key constraint is incorrectly formed”) (SQL: alter table replies add constraint replies_question_id_foreign foreign key (`question_id`) references questions (`id`) on delete cascade)
delete your database and migrate it again (well, not the best but easiet )
2019-04-12 08:27:10
okuban 2019-04-12 08:26:32
Migration :
Schema::table(‘replies’, function(Blueprint $table) {
$table->foreign(‘question_id’)->references(‘id’)->on(‘questions’)
->onDelete(‘cascade’);
});
wait where’s your question_id ?!
okuban 2019-04-12 08:27:12
2019-04-12 08:26:34
delete your database and migrate it again (well, not the best but easiet )
I did it but nothing
2019-04-12 08:27:41
okuban 2019-04-12 08:27:12
I did it but nothing
no no I thought your migration is fine, seems like you have error in migration file, answer above question please
senhorY 2019-04-12 08:28:29
You don’t have an actual key to reference
okuban 2019-04-12 08:28:29
2019-04-12 08:27:10
wait where’s your question_id ?!
In replies table
2019-04-12 08:28:54
okuban 2019-04-12 08:28:29
In replies table
u need to make the key bro !!
okuban 2019-04-12 08:29:16
senhorY 2019-04-12 08:29:24
The foreign method is going to look for question_id and link it to the id on questions tables
senhorY 2019-04-12 08:30:08
Ah, you’re gonna need a many to many relationship
2019-04-12 08:30:29
senhorY 2019-04-12 08:30:08
Ah, you’re gonna need a many to many relationship
no, no need for relationship at this level
senhorY 2019-04-12 08:30:36
The second schema is not right
okuban 2019-04-12 08:30:57
senhorY 2019-04-12 08:30:36
The second schema is not right
What’s wrong?
2019-04-12 08:31:00
okuban 2019-04-12 08:29:16
send us the code so we recode it for you
senhorY 2019-04-12 08:31:06
I mean not needed
senhorY 2019-04-12 08:31:18
You can place it all in the create method
senhorY 2019-04-12 08:31:39
What’s the id name for questions table?
senhorY 2019-04-12 08:31:48
If it’s not id then that’s it
okuban 2019-04-12 08:32:01
senhorY 2019-04-12 08:31:39
What’s the id name for questions table?
It’s id
senhorY 2019-04-12 08:32:04
And I’m sure it’s biginteger
senhorY 2019-04-12 08:32:08
Not integer
2019-04-12 08:32:40
just send your code so we remake it for you 🙂
okuban 2019-04-12 08:32:58
senhorY 2019-04-12 08:32:04
And I’m sure it’s biginteger
Big increments
senhorY 2019-04-12 08:33:09
okuban 2019-04-12 08:32:58
Big increments
Then that’s it
senhorY 2019-04-12 08:33:15
The type should match
okuban 2019-04-12 08:33:22
okuban 2019-04-12 08:42:03
2019-04-12 08:32:40
just send your code so we remake it for you 🙂
https://hastebin.com/axuqaqolid.xml
okuban 2019-04-12 08:42:18
That’s the code
2019-04-12 08:43:11
Schema::create(‘replies’, function (Blueprint $table) {
$table->bigIncrements(‘id’);
$table->text(‘body’);
$table->bigInteger(‘question_id’)->unsigned();
$table->integer(‘user_id’)->unsigned();
$table->foreign(‘question_id’)->references(‘id’)->on(‘questions’)
->onDelete(‘cascade’);
$table->timestamps();
});
2019-04-12 08:43:42
okuban 2019-04-12 08:42:18
That’s the code
add the following code to “up” function (remove other coding)
okuban 2019-04-12 08:48:02
2019-04-12 08:43:42
add the following code to “up” function (remove other coding)
Thank you. It worked. What’s the trick?
2019-04-12 08:51:57
okuban 2019-04-12 08:48:02
Thank you. It worked. What’s the trick?
no trick bro, bigIncrement means I want to auto add big integers to that row, so it doesn’t take credit from “questions” table
and then when you have “BigIncrement” in your id, you have to have “bigInteger” for its foreign key
Maks_Ramazan 2019-04-12 09:02:27
Rules:
4 sheep pens
The initial number of sheep 10 are randomly located in pens.
1 day lasts 10 seconds
every day one more sheep appears in one of the pens where more than 1 sheep
every 10 day one any sheep is taken (you know where)
if there is only one sheep left in the pen, then we take the pen where most of the sheep are and transfer one of them to a single sheep
pens should never be empty
the days must be counted, which is not reset when the page is updated
there should be a history of actions taking place in pens (no need to output anywhere)
help me please
Maks_Ramazan 2019-04-12 09:03:04
I can not figure out how to determine the model of the day
mrhalil 2019-04-12 10:06:13
Hey guys, ı have some question for laravel/passport can you help me?
I’m building rest API server with laravel, we have some first-party (provided by us) applications like vue.js (frontend) and flutter (mobile).
We don’t need to thirty-part app authentication should we use laravel/passport?
For my apps, should ı use password access client or personal access clients?
İn password access client, ı must store client-id and client-secret on the user-side (this is not safe)
İf ı use personal access tokens, ı can’t set the lifetime easily.
okuban 2019-04-12 11:14:29
2019-04-12 08:51:57
no trick bro, bigIncrement means I want to auto add big integers to that row, so it doesn’t take credit from “questions” table
and then when you have “BigIncrement” in your id, you have to have “bigInteger” for its foreign key
Another error while doing db::seed :
BadMethodCallException : Call to undefined method AppModelsReply::like()
kalpeshpatelbyk 2019-04-12 11:24:50
Hi anyone please help me to figure out how to use css and javascript in non route view laravel 5.7
kalpeshpatelbyk 2019-04-12 11:25:49
My login and register blade template are using css from defined path but reset page not able to load css
kalpeshpatelbyk 2019-04-12 11:26:41
On reset source page i m able to view css and jss but browser not loading css and js
kalpeshpatelbyk 2019-04-12 11:58:03
← prev | next →