anyone can help how to overcome this?
join just tow table?
your third table name?
is this your third table?
which table is the main table?
Have anyone worked with the coinpayments api ?
read this for more information:
Help please
thanks brother..
welcome
i don’t know ecaxtly
use eloquent relationship
what?

$ask
anyone can help how to overcome this?
anyone can help how to overcome this?
It’s obvious, you didn’t pass parameter to generate url for artikel.update
You wud be invited to our free course via YouTube.
In case you wud be interested, plz subscribe our YouTube channel
https://www.youtube.com/channel/UCL22nVSVTz0831V96vRw8mg
But don’t forget to click notification bell, so that you don’t miss the live event
{
$totalEvent = DB::table(‘artisans’,’sections’)
->join(‘evenements’, ‘artisans.id’, ‘=’, ‘evenements.idArtisan’)
/* ->join(‘sections’, ‘sections.idSyndicat’, ‘=’, ‘syndicats.id’)
->join(‘artisan__sections’, ‘sections.id’, ‘=’, ‘artisan__sections.idSection’) */
->select(‘evenements.*’,’artisans.nom’,’artisans.prenom’)
->orderby(‘evenements.created_at’,’DESC’)
->get();
return view(‘actualite’,compact(‘totalEvent’));
}
artisan__section
artisan__section
yes
{
$totalEvent = DB::table(‘artisans’)
->join(‘sections’, ‘artisans.id’, ‘=’, ‘sections.idArtisan’)
->join(‘artisan__sections as as’, ‘sections.id’, ‘=’, ‘as.idSection’)
->select(‘sections.*’,’artisans.nom’,’artisans.prenom’,’as.name’)
->orderby(‘artisans.created_at’,’DESC’)
->get();
return view(‘actualite’,compact(‘totalEvent’));
}
It’s also ok
no
but I would like to have it in query builder form. Thank you for helping me
{
$totalEvent =DB::select(“select evenements.*,syndicats.nom as NomSyndicat,sections.
libelleSection as NomSection,artisans.nom,artisans.prenom
from artisans,evenements,syndicats,sections,artisan__sections
where artisan__sections.idArtisan=artisans.id
AND artisan__sections.idSection=sections.id
AND artisan__sections.idSyndicat=syndicats.id
AND evenements.idArtisan=artisans.id
ORDER BY evenements.created_at DESC
“);
return view(‘actualite’,compact(‘totalEvent’));
}
{
$totalEvent =DB::select(“select evenements.*,syndicats.nom as NomSyndicat,sections.
libelleSection as NomSection,artisans.nom,artisans.prenom
from artisans,evenements,syndicats,sections,artisan__sections
where artisan__sections.idArtisan=artisans.id
AND artisan__sections.idSection=sections.id
AND artisan__sections.idSyndicat=syndicats.id
AND evenements.idArtisan=artisans.id
ORDER BY evenements.created_at DESC
“);
return view(‘actualite’,compact(‘totalEvent’));
}
which table is the main table?
Something like this should work
class HomeController extends Controller{
public function getActualite()
{
$totalEvent = Evenement::with([
‘artisan’,
‘artisan__sections’,
‘artisan__sections.sections’,
‘artisan__sections.syndicats’ => function($query){
return $query->select([
‘id’,
‘nom’ => ‘NomSyndicat’,
‘libelleSection’ => ‘NomSection’,
]);
},
‘artisan__sections.artisan’ => function($query){
return $query->select([
‘id’,
‘nom’,
‘prenom’,
]);
},
])
->orderBy(‘created_at’, ‘DESC’)
->get();
return view(‘actualite’,compact(‘totalEvent’));
}
}
class Evenement extends Model{
public function artisans(){
return $this->hasOne(‘AppArtisan’, ‘idArtisan’);
}
}
class ArtisanSection extends Model{
public function artisan(){
return $this->hasOne(‘AppArtisan’,’idArtisan’);
}
public function sections(){
return $this->hasMany(‘AppSection’,’idSection’);
}
public function syndicats(){
return $this->hasMany(‘AppSyndicat’, ‘idSyndicat’);
}
}

Hello everyone I am now headaching to get this parent attribute,
please tell me how to get this parent , thanks.
class HomeController extends Controller{
public function getActualite()
{
$totalEvent = Evenement::with([
‘artisan’,
‘artisan__sections’,
‘artisan__sections.sections’,
‘artisan__sections.syndicats’ => function($query){
return $query->select([
‘id’,
‘nom’ => ‘NomSyndicat’,
‘libelleSection’ => ‘NomSection’,
]);
},
‘artisan__sections.artisan’ => function($query){
return $query->select([
‘id’,
‘nom’,
‘prenom’,
]);
},
])
->orderBy(‘created_at’, ‘DESC’)
->get();
return view(‘actualite’,compact(‘totalEvent’));
}
}
class Evenement extends Model{
public function artisans(){
return $this->hasOne(‘AppArtisan’, ‘idArtisan’);
}
}
class ArtisanSection extends Model{
public function artisan(){
return $this->hasOne(‘AppArtisan’,’idArtisan’);
}
public function sections(){
return $this->hasMany(‘AppSection’,’idSection’);
}
public function syndicats(){
return $this->hasMany(‘AppSyndicat’, ‘idSyndicat’);
}
}
i will try it thank u
IlluminateDatabaseQueryException
SQLSTATE[42S22]: Column not found: 1054 Champ ‘artisans.idArtisan’ inconnu dans where clause (SQL: select * from artisans where artisans.idArtisan in (1, 2))