3

以下を使用したい:ライブラリフォルダのホームズ:

http://paste.laravel.com/Em

    // Determine if request is from a mobile device
Holmes::is_mobile(); // returns boolean

// Determine the type of device
$device = Holmes::get_device(); // returns string

// Determine if a specific device is being used
// Any supported device below is acceptable
// lowercased no spaces, obviously. <3
Holmes::is_ipad();
Holmes::is_blackberrytablet();

何をどこに置く?

ルートで:?

意見:

@if(Holmes::is_iphone())
{{ 'this is an iphone' }}
@endif

このエラーも表示されます: Holmes ライブラリ ファイルの 25 行目で参照によって変数のみを渡す必要があります

私は手続き上の混乱から移行しようとしています;)

4

1 に答える 1

3

Chris Fidao (Fideloper) によるLaravel 4でライブラリをロードする方法についての素晴らしい記事があります: http://fideloper.com/laravel-4-application-setup-app-library-autoloading

于 2013-05-30T13:44:16.837 に答える