samedi 27 août 2016

How injecting a array in my view with laravel 5 using a facade and the App:make method in the view

I created a facade that works well, a using service container :

My class :

namespace App\Classes;

class Administration {

  public function message_success()
{
   $message = "success";

  return $message;

  }

}

My view :

Résultat Ok

But when I want to work with a array, I can not retrieve a value in my view with App::make.

My class :

namespace App\Classes;

class Administration {

public function message_test($message, array $type = array())
{

  $type = ['message1' => 'valeur1', 'message2' => 'valeur2'];

  return $message;

  }

}

How to build the syntax in my view?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ciYp8i
via IFTTT

Aucun commentaire:

Enregistrer un commentaire