public function deleteDestroy($id)
 {
     $user = User::fromToken();
     $certif = ConfigCertificado::find($id);
     $certif->delete();
     return $certif;
 }
Ejemplo n.º 2
0
 public function getColegio()
 {
     $user = User::fromToken();
     $years = Year::all();
     foreach ($years as $year) {
         $year->periodos = Periodo::where('year_id', $year->id)->get();
     }
     $certif = ConfigCertificado::all();
     $imagenes = ImageModel::where('user_id', $user->user_id)->where('publica', true)->get();
     $result = ['years' => $years, 'certificados' => $certif, 'imagenes' => $imagenes];
     return $result;
 }