@extends('layouts.admin')

@section('content')

<div class=" alert alert-info"><b>Pour modifier cette Page</b><br>organit > resources/views/admin/cheatsheet/dev_cheatsheet_Vue</div>



<h2>Passer variable PHP a vue.js</h2>
<pre>
	<?php 
$devis = \App\Devis::find(22);
?>

	<bootstrapping :devis="{{$devis}}"></bootstrapping>


	....

    props :{
		devis:{
			required: false,
			type:Object,
			}
    },

</pre>



Ejemplo n.º 2
0
 public function pdf_dossier_interne($devis_id)
 {
     $devis = Devis::find($devis_id);
     //return View::make('admin/devis.pdf_propal', ['devis'=>$devis]);
     return PDF::loadView('admin/devis.pdf_dossier_interne', ['devis' => $devis])->save('devis/' . $devis_id . '_interne.pdf')->download($devis->propal_title . '-' . $devis->propal_subtitle . '.pdf');
 }
Ejemplo n.º 3
0
 public function createTableRelation($request, $model, $toModel)
 {
     $devis = Devis::find($request->devis_id);
     switch ($request->laravel_name) {
         case 'hasMany':
             echo "hasMany<br>";
             $model->create_hasMany_relation_with($request, $toModel);
             break;
         case 'belongsTo':
             echo "belongsTo<br>";
             $model->create_belongsTo_relation_with($request, $toModel);
             break;
         case 'belongsToMany':
             echo "belongsToMany<br>";
             $model->create_belongsToMany_relation_with($request, $toModel);
             break;
         case 'hasOne':
             echo "hasOne<br>";
             # code...
             break;
         case 'morphedByMany':
             echo "morphedByMany<br>";
             # code...
             break;
         case 'morphToMany':
             echo "morphToMany<br>";
             # code...
             break;
         default:
             # code...
             break;
     }
 }
Ejemplo n.º 4
0
 public function list_for_devis($devis_id)
 {
     $devis = Devis::find($devis_id);
     $table = Table::where('devis_id', $devis_id)->orderBy('updated_at', 'desc')->paginate(50);
     return view('admin.table.index', compact('devis', 'table'));
 }