2017 © Pedro Peláez
 

library larahelpers

image

flo5581/larahelpers

  • Wednesday, January 27, 2016
  • by flo5581
  • Repository
  • 1 Watchers
  • 0 Stars
  • 136 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Larahelpers

Some custom helpers and functions for Laravel 5, (*1)

Installation

Require the package in composer:, (*2)

composer require flo5581/larahelpers dev-master, (*3)

Register Service Provider in app.php:, (*4)

'Flo5581\Larahelpers\BladeExtensions', (*5)

Features

Laravel functions and definitions:

controller() -> Similar to Route::controller()
controllers() -> Similar to Route::controllers()
get_routes() -> Register multiple GET routes in an array,
example: get_routes(['/' => function(){return view('index');}, 'test' => 'TestController@index']);
, (*6)

post_routes() -> Same as get_routes() but with POST requests instead
group() -> Similar to Route::group()
input() -> Similar to Input::get(), Input::all() (if no value is set)
user() -> Similar to Auth::user()
login() -> Similar to Auth::login() or Auth::loginUsingId() if a User Model or ID is given,
example: login(['email' => $email, 'password' => $password]), login($user), login(1)
, (*7)

logout() -> Similar to Auth::logout()
check() -> Similar to Auth::check()
, (*8)

New functions and definitions:

days_in_month($month, $year) -> Calculates days in a month, accepts parameter 1: month (int), parameter 2: year (int)
num_to_word($number) -> Converts a number into words
, (*9)

Blade extensions:

@use(path) -> similar to phps use, example: @use(App\Models\User)
@define(code) -> define variables inside blade, example: @define($i = 1)
@echo(string) -> echo out stuff, example @echo('hi')
@print(var) -> print out stuff, example @print($array)
@dd(var) -> similar to dd(), example: @dd($user)
@php, @endphp -> basically open and close php tags, example: @php echo 'hi'; @endphp
, (*10)

The Versions

27/01 2016

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Avatar flo5581

27/01 2016

1.2.3

1.2.3.0

  Sources   Download

MIT

The Requires

 

by Avatar flo5581

27/01 2016

1.2.2

1.2.2.0

  Sources   Download

MIT

The Requires

 

by Avatar flo5581

16/07 2015

1.1.2

1.1.2.0

  Sources   Download

MIT

The Requires

 

by Avatar flo5581

16/07 2015

1.1.1

1.1.1.0

  Sources   Download

MIT

The Requires

 

by Avatar flo5581

15/07 2015

1.1.0

1.1.0.0

  Sources   Download

MIT

The Requires

 

by Avatar flo5581

11/07 2015

1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

 

by Avatar flo5581