Last active
October 28, 2019 13:53
-
-
Save mxriverlynn/8718366 to your computer and use it in GitHub Desktop.
laravel and kendo ui php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class HomeController extends BaseController { | |
public function showWelcome() | |
{ | |
$users = User::all(); | |
return View::make('hello')->with('users', $users); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"classmap": [ | |
"app/commands", | |
"app/controllers", | |
"app/models", | |
"lib", | |
"app/database/migrations", | |
"app/database/seeds", | |
"app/tests/TestCase.php" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once 'lib/Kendo/Autoload.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function showWelcome() | |
{ | |
$datePicker = new \Kendo\UI\DatePicker('datepicker'); | |
$users = User::all(); | |
$args = array( | |
'users' => $users, | |
'datePicker' => $datePicker | |
); | |
return View::make('hello')->with($args); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends("layout") | |
@section("style") | |
<link href="/kendoui/styles/kendo.common.min.css" rel="stylesheet" type="text/css" /> | |
<link href="/kendoui/styles/kendo.default.min.css" rel="stylesheet" type="text/css" /> | |
@stop | |
@section("javascript") | |
<script src="/kendoui/js/jquery.min.js"></script> | |
<script src="/kendoui/js/kendo.web.min.js"></script> | |
@stop | |
@section("content") | |
<div class="welcome"> | |
My first laravel app | |
<ul> | |
{{ $datePicker->render() }} | |
@foreach($users as $user) | |
<li>{{ $user->name }}</li> | |
@endforeach | |
</ul> | |
</div> | |
@stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function showWelcome() | |
{ | |
$datePicker = new \Kendo\UI\DatePicker('datepicker'); | |
$users = User::all(); | |
$ds = new \Kendo\Data\DataSource(); | |
$ds->data($users->toArray()); | |
$dropList = new \Kendo\UI\DropDownList('droplist'); | |
$dropList | |
->dataTextField("name") | |
->dataValueField("id") | |
->dataSource($ds); | |
$args = array( | |
'users' => $users, | |
'datePicker' => $datePicker, | |
'dropList' => $dropList | |
); | |
return View::make('hello')->with($args); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@section("content") | |
<div class="welcome"> | |
My first laravel app | |
<p> | |
{{ $datePicker->render() }} | |
</p> | |
<p> | |
{{ $dropList->render() }} | |
</p> | |
</div> | |
@stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment