dev-analysis-XlRlM9
dev-analysis-XlRlM9 https://github.com/karriereat/legacy
Apache-2.0
The Requires
- php >=5.6
Wallogit.com
2017 © Pedro Peláez
This package contains some convenient helper functions inspired by laravel helpers that can be used in a legacy application without IoC., (*2)
Tasks like sending a redirect or working with the session can be a real mess in plain php. Therefore this package provides helper functions to help with these problems., (*3)
You can install the package via composer, (*4)
composer require karriere/legacy
Place the initialize call after session_start and before helper usage:, (*5)
\Karriere\Legacy\Bootstrap::initialize();
Dumps an arbitrary variable/value and stops execution of the script., (*6)
dd('any value');
dd($_GET);
Helper method for php session operations., (*7)
session();
Returns an instance of Karriere\Legacy\Session., (*8)
Retrieve a value from the session, the call allows a second parameter that is returned as default value if no session data is found for the eky, (*9)
session('key');
session('key', 'no data');
Store the given key-value pair in the session., (*10)
session(['key' => 'value']);
Store a key-value pair only for the subsequent request., (*11)
session()->flash($key, $value);
Helper method for sending redirects., (*12)
The method allows a second parameter for status code, the default value is 302 (Found - Moved Temporarily)., (*13)
redirect('http://www.karriere.at')->send();
redirect('http://www.karriere.at', 301)->send();
The redirector allows to store flash messages before sending the actual redirect., (*14)
redirect('http://www.karriere.at')->with('status', 'something happened')->send();
Apache License 2.0 Please see LICENSE for more information., (*15)
Apache-2.0