https://github.com/abdullahghanem/ajax-blade
Easy AJAX with blade
https://github.com/abdullahghanem/ajax-blade
Last synced: about 1 month ago
JSON representation
Easy AJAX with blade
- Host: GitHub
- URL: https://github.com/abdullahghanem/ajax-blade
- Owner: AbdullahGhanem
- Created: 2015-10-10T13:32:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-11T00:51:51.000Z (over 9 years ago)
- Last Synced: 2025-05-06T06:09:40.419Z (about 1 month ago)
- Language: PHP
- Homepage:
- Size: 141 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Easy AJAX with blade
## Installation
First, pull in the package through Composer.
```js
"require": {
"ghanem/ajaxblade": "0.2.*"
}
```
or use.```bash
composer require ghanem/ajaxblade
```if using Laravel 5, include the service provider within `config/app.php`.
```php
'providers' => [
'Ghanem\Ajaxblade\AjaxbladeServiceProvider'
];
```now run this comand:
```bash
php artisan vendor:publish
```## Example
Within your controllers, before you perform a redirect...```php
public function show()
{
$articles = Article::orderBy('id', 'DESC')->Paginate(20);return view('home',compact('articles'));
}
```this is home view :
```html
Document
@foreach ($users as user)
$user->name
@endforeach
@ajaxblade($users)
```