LARAVEL - Base table or view not found: 1146 Table doesn't exist (SQL: select * from ) The Next CEO of Stack OverflowLaravel 5.2 SQLSTATE[42S02]: Base table or view not found: 1146 TableLaravel: Base table or view not found: 1146 Table doesn't existBase table or view not found: 1146 Table in laravelBase table or view not found: 1146 Table 'epharmacy.medicines' doesn't existIlluminateDatabaseQueryException with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.people' doesn't existSQLSTATE[42S02]: Base table or view not found: 1146 Table 'prj_roocket.permissions' doesn't existBase table or view not found: 1146 Table 'prj_oxbir.permissions' doesn't existBase table or view not found laravelAccessing Laravel custom Pivot class directlyBase table or view not found: 1146 Table
How to set page number in right side in chapter title page?
Purpose of level-shifter with same in and out voltages
Getting Stale Gas Out of a Gas Tank w/out Dropping the Tank
In the "Harry Potter and the Order of the Phoenix" videogame, what potion is used to sabotage Umbridge's speakers?
How do I fit a non linear curve?
Defamation due to breach of confidentiality
What day is it again?
Do scriptures give a method to recognize a truly self-realized person/jivanmukta?
What steps are necessary to read a Modern SSD in Medieval Europe?
Redefining symbol midway through a document
What is the difference between Statistical Mechanics and Quantum Mechanics
Decide between Polyglossia and Babel for LuaLaTeX in 2019
Can I use the word “Senior” as part of a job title directly in German?
Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?
How to get the last not-null value in an ordered column of a huge table?
(How) Could a medieval fantasy world survive a magic-induced "nuclear winter"?
Is a distribution that is normal, but highly skewed, considered Gaussian?
Expressing the idea of having a very busy time
How to use ReplaceAll on an expression that contains a rule
Prepend last line of stdin to entire stdin
"Eavesdropping" vs "Listen in on"
From jafe to El-Guest
Can someone explain this formula for calculating Manhattan distance?
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
LARAVEL - Base table or view not found: 1146 Table doesn't exist (SQL: select * from )
The Next CEO of Stack OverflowLaravel 5.2 SQLSTATE[42S02]: Base table or view not found: 1146 TableLaravel: Base table or view not found: 1146 Table doesn't existBase table or view not found: 1146 Table in laravelBase table or view not found: 1146 Table 'epharmacy.medicines' doesn't existIlluminateDatabaseQueryException with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.people' doesn't existSQLSTATE[42S02]: Base table or view not found: 1146 Table 'prj_roocket.permissions' doesn't existBase table or view not found: 1146 Table 'prj_oxbir.permissions' doesn't existBase table or view not found laravelAccessing Laravel custom Pivot class directlyBase table or view not found: 1146 Table
I have a Mysql database minho.win and a table called utilizadores.
I created a model class php artisan make:model Utilizador
When I do php artisan tinker and then do AppUtilizador::all() I get this error:
IlluminateDatabaseQueryException with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'minho.win.utilizadors' doesn't exist (SQL: select * from
utilizadors)'
Why is it looking for a table named utilizadors? How can I make it look for the right table - utilizadores?
php laravel laravel-5 model
add a comment |
I have a Mysql database minho.win and a table called utilizadores.
I created a model class php artisan make:model Utilizador
When I do php artisan tinker and then do AppUtilizador::all() I get this error:
IlluminateDatabaseQueryException with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'minho.win.utilizadors' doesn't exist (SQL: select * from
utilizadors)'
Why is it looking for a table named utilizadors? How can I make it look for the right table - utilizadores?
php laravel laravel-5 model
add a comment |
I have a Mysql database minho.win and a table called utilizadores.
I created a model class php artisan make:model Utilizador
When I do php artisan tinker and then do AppUtilizador::all() I get this error:
IlluminateDatabaseQueryException with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'minho.win.utilizadors' doesn't exist (SQL: select * from
utilizadors)'
Why is it looking for a table named utilizadors? How can I make it look for the right table - utilizadores?
php laravel laravel-5 model
I have a Mysql database minho.win and a table called utilizadores.
I created a model class php artisan make:model Utilizador
When I do php artisan tinker and then do AppUtilizador::all() I get this error:
IlluminateDatabaseQueryException with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'minho.win.utilizadors' doesn't exist (SQL: select * from
utilizadors)'
Why is it looking for a table named utilizadors? How can I make it look for the right table - utilizadores?
php laravel laravel-5 model
php laravel laravel-5 model
edited Dec 17 '17 at 20:08
Mathew Tinsley
5,35521731
5,35521731
asked Dec 17 '17 at 20:00
alexandre1985alexandre1985
5452621
5452621
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You can specify the table in your model:
class Utilizador extends Model
protected $table = 'utilizadores';
https://laravel.com/docs/5.5/eloquent#eloquent-model-conventions
add a comment |
so you have to protect your table in you Model
something like that:in Your Model
protected $table = "utilizadores";
put your field's name in this array, it will seem like that:
protected $filliable = [
"id",
""
];
add a comment |
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47858924%2flaravel-base-table-or-view-not-found-1146-table-doesnt-exist-sql-select%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can specify the table in your model:
class Utilizador extends Model
protected $table = 'utilizadores';
https://laravel.com/docs/5.5/eloquent#eloquent-model-conventions
add a comment |
You can specify the table in your model:
class Utilizador extends Model
protected $table = 'utilizadores';
https://laravel.com/docs/5.5/eloquent#eloquent-model-conventions
add a comment |
You can specify the table in your model:
class Utilizador extends Model
protected $table = 'utilizadores';
https://laravel.com/docs/5.5/eloquent#eloquent-model-conventions
You can specify the table in your model:
class Utilizador extends Model
protected $table = 'utilizadores';
https://laravel.com/docs/5.5/eloquent#eloquent-model-conventions
answered Dec 17 '17 at 20:05
Mathew TinsleyMathew Tinsley
5,35521731
5,35521731
add a comment |
add a comment |
so you have to protect your table in you Model
something like that:in Your Model
protected $table = "utilizadores";
put your field's name in this array, it will seem like that:
protected $filliable = [
"id",
""
];
add a comment |
so you have to protect your table in you Model
something like that:in Your Model
protected $table = "utilizadores";
put your field's name in this array, it will seem like that:
protected $filliable = [
"id",
""
];
add a comment |
so you have to protect your table in you Model
something like that:in Your Model
protected $table = "utilizadores";
put your field's name in this array, it will seem like that:
protected $filliable = [
"id",
""
];
so you have to protect your table in you Model
something like that:in Your Model
protected $table = "utilizadores";
put your field's name in this array, it will seem like that:
protected $filliable = [
"id",
""
];
edited Mar 8 at 17:17
AAEM
1,009420
1,009420
answered Mar 8 at 15:32
Telemarque ErnestTelemarque Ernest
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47858924%2flaravel-base-table-or-view-not-found-1146-table-doesnt-exist-sql-select%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
