I have a model that takes the data with a with in laravel, to get correlated data, is there form of this correlated data to see only some specific fields and not all the data in the table?
I tried to do so:
return ModelPai::with(array('nome...
I'd like to allow access to a few pages only if the user is logged in.
I did so:
Route::group( ['middleware' => 'usuario'], function (){
/* Minhas páginas */
});
So far so good, but I'd like to check if the password is already the...
The id is auto increment, but the id_uc is unique, just not to enter an id_uc equal. I want you to return to view a message.
$storm =new ListaStorm();
$storm->id = $id;
$storm->id_uc = $id_uc;
$storm->save();
error message?
@fore...
MySQL WorkBench
ErrorException Array to string conversion
public function listadepontos()
{
$id = auth()->user()->id;
$somas = DB::SELECT("select SUM(pontuacao) FROM palpite WHERE id_u = '$id' ");
return view('pontu...
I'm creating this procedure to run once a day, as I have no experience, I got an error in the code below:
CREATE (definer omitido) PROCEDURE 'MULTAOFF'()
BEGIN
set @multado = (select 'CPFAluno' from multa where 'dataMultaFim' &l...
I am using Notification in Laravel to send password reset emails. My toMail method looks like this:
public function toMail($notifiable)
{
return (new MailMessage)
->subject('Link para redefinição de senha')...
I have the following query:
SELECT P.ID
,P.NR_CRACHA CRACHA
,P.NM_CLIENTE NOME
,E.DS_EMPRESA EMPRESA
,SUM( R.VL_PRECO ) VALOR
FROM registro R
JOIN pessoa P
JOIN empresa E
WHERE P.CD_PESSO...
There is a contact form where the user sends a message to the system and the system automatically sends a message back thanking their contact and along with the message I send the most viewed articles.
What happens is that in my hotmail (in my m...
I'm performing a pagination of the data as follows:
Controller:
$brands = $this->brand::where('id', $filter_id)->paginate($this->total_page);
View:
{{ $brands->appends(['id' => isset($filter_id) ? $filter_id : ''])->l...
I have the following Tabelas/Models and I am not able to make a query:
Model 1
id | Name
---+---------------
1 | Model1.1
2 | Model1.2
3 | Model1.3
Model 2
id | Name | model1_id
---+----------+----------
1 | Mode...