Package Data | |
---|---|
Maintainer Username: | awkwardideas |
Maintainer Contact: | chad@awkwardideas.com (Chad Haney) |
Package Create Date: | 2016-12-29 |
Package Last Update: | 2017-04-12 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-02-07 15:00:29 |
Package Statistics | |
---|---|
Total Downloads: | 2,098 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 10 |
Total Watchers: | 2 |
Total Forks: | 2 |
Total Open Issues: | 0 |
$ composer require awkwardideas/switchblade
Under Package Service Providers Add
AwkwardIdeas\SwitchBlade\SwitchBladeServiceProvider::class,
A php switch statement implemented via blade.
The switch statement is similar to a series of IF statements on the same expression. In many occasions, you may want to compare the same variable (or expression) with many different values, and execute a different piece of code depending on which value it equals to. This is exactly what the switch statement is for.
@switch(expression, caseStatement1 [, caseStatement2, caseStatement3...])
@endcase
call.@endcase
@case(caseStatement1 [, caseStatement2, caseStatement3...])
@case
and next @endcase
call.@defaultcase
@endswitch
@endswitch
Set, increment or decrement variables without having to go in and out of php.
@set(variable, value)
@increment(variable)
@decrement(variable)
@htmlAttribute(value)
@explode(delimiter, string, index)
@implode(delimiter, array)
@dd(variable)
@varDump(variable)
@getenv(ENV_VAR_NAME)
@continue
@break
@ifempty(variable)
@endifempty
@ifnull(variable)
@endifnull
@notnull(variable)
@endnotnull
@optional('section')
@endoptional
@iffileexists(filepath)
@endiffileexists
@hascount(variable)
@endhascount
##Lang Modification
@lang(key[, replace, locale])
##Bag
@bag(variable[,value])
@initScript([scriptName])