|
| 1 | +# Laravel Sqlite Cache - The Missing Sqlite Cache Driver Package |
| 2 | + |
| 3 | +Made with ❤️ by [Iqbal Hasan](https://www.facebook.com/iqbalhasan.dev/) |
| 4 | + |
| 5 | +- **Laravel**: 5.6/5.7/5.8/6.0/7.0/8.0 |
| 6 | +- **Author**: IQBAL HASAN |
| 7 | +- **Website & Documentation:**: https://iqbalhasandev.github.io/laravel-sqlite-cache/ |
| 8 | + |
| 9 | +<p align="center"> |
| 10 | +<a href="https://github.com/iqbalhasandev/laravel-sqlite-cache/issues"><img src="https://img.shields.io/github/issues/iqbalhasandev/laravel-sqlite-cache" alt="issues"></a> |
| 11 | +<a href="https://github.com/iqbalhasandev/laravel-sqlite-cache/network/members"><img src="https://img.shields.io/github/forks/iqbalhasandev/laravel-sqlite-cache" alt="forks"></a> |
| 12 | +<a href="https://github.com/iqbalhasandev/laravel-sqlite-cache/stargazers"><img src="https://img.shields.io/github/stars/iqbalhasandev/laravel-sqlite-cache" alt="stars "></a> |
| 13 | +<a href="https://packagist.org/packages/iqbalhasandev/sqlite-cache"><img src="https://poser.pugx.org/iqbalhasandev/sqlite-cache/v" alt="Latest Stable Version"></a> |
| 14 | +<a href="https://packagist.org/packages/iqbalhasandev/sqlite-cache"><img src="https://poser.pugx.org/iqbalhasandev/sqlite-cache/downloads" alt="Total Downloads"></a> |
| 15 | +<a href="https://packagist.org/packages/iqbalhasandev/sqlite-cache"><img src="https://poser.pugx.org/iqbalhasandev/sqlite-cache/v/unstable" alt="Latest Unstable Version"></a> |
| 16 | +<a href="http://opensource.org/licenses/MIT"><img src="https://img.shields.io/github/license/iqbalhasandev/laravel-sqlite-cache" alt="license"></a> |
| 17 | + |
| 18 | +</p> |
| 19 | +<hr> |
| 20 | + |
| 21 | +Integrate Cache Driver into your project easily with laravel-sqlite-cache package. |
| 22 | + |
| 23 | +## Installation Steps |
| 24 | + |
| 25 | +### 1. Require the Package |
| 26 | + |
| 27 | +After creating your new Laravel application you can include the Sqlite Cache Driver Package with the following command: |
| 28 | + |
| 29 | +```bash |
| 30 | +composer require iqbalhasandev/sqlite-cache |
| 31 | +``` |
| 32 | + |
| 33 | +### 2. If you're using Laravel 5.5, this is all there is to do. |
| 34 | + |
| 35 | +Should you still be on version 5.4 of Laravel, the final steps for you are to add the service provider of the package and alias the package. To do this open your `config/app.php` file. |
| 36 | + |
| 37 | +Add a new line to the `providers` array: |
| 38 | + |
| 39 | + Iqbal\SqliteCache\SqliteCacheProvider::class |
| 40 | + |
| 41 | +### 3. Then run the command in the terminal "php artisan sqlite-cache:install; php artisan sqlite-cache:table;" |
| 42 | + |
| 43 | +```bash |
| 44 | + |
| 45 | +// * To install & publish all config files of sqlite-cache package |
| 46 | +php artisan sqlite-cache:install |
| 47 | + |
| 48 | +//Then Run |
| 49 | + |
| 50 | +// * To Create Cache Table |
| 51 | +php artisan sqlite-cache:table |
| 52 | + |
| 53 | +``` |
| 54 | + |
| 55 | +### 4. Change the Cache Driver " open .env file then change CACHE_DRIVER=sqlite" |
| 56 | + |
| 57 | +```env |
| 58 | +
|
| 59 | +CACHE_DRIVER=sqlite |
| 60 | +
|
| 61 | +``` |
| 62 | + |
| 63 | +## Overview |
| 64 | + |
| 65 | +Look at one of the following topics to learn more about laravel-bulksmsbd |
| 66 | + |
| 67 | +- [Usage](#usage) |
| 68 | +- [Configuration](#configuration) |
| 69 | + |
| 70 | +## Usage |
| 71 | + |
| 72 | +Below is an example of Cache Data |
| 73 | + |
| 74 | +```php |
| 75 | +//Route web.php |
| 76 | + |
| 77 | + |
| 78 | +use Illuminate\Support\Facades\Cache; |
| 79 | + |
| 80 | +Route::get('/laravel-sqlite-cache', function () { |
| 81 | + Cache::put('testing', 'laravel sqlite cache is Awesome'); |
| 82 | + return Cache::get('testing'); |
| 83 | +}); |
| 84 | +``` |
| 85 | + |
| 86 | +To know more about the use of laravel cache, visit <a href="https://laravel.com/docs/7.x/cache#cache-usage"> laravel Official Webpage</a> |
| 87 | + |
| 88 | +### Configuration |
| 89 | + |
| 90 | +You can change Cache Database Name to change name follow these step: |
| 91 | + |
| 92 | +## Add `CACHE_DATABASE` to **.env** file. |
| 93 | + |
| 94 | +```bash |
| 95 | +// optional Defalt Cache Database Name 'cache.sqlite' |
| 96 | +CACHE_DATABASE={databasename} //E.g. 'cache.sqlite' |
| 97 | + |
| 98 | +``` |
| 99 | + |
| 100 | +## Then run the command in the terminal "php artisan sqlite-cache:install; php artisan sqlite-cache:table;" |
| 101 | + |
| 102 | +```bash |
| 103 | + |
| 104 | +// * To install & publish all config files of sqlite-cache package |
| 105 | +php artisan sqlite-cache:install |
| 106 | + |
| 107 | +//Then Run |
| 108 | + |
| 109 | +// * To Create Cache Table |
| 110 | +php artisan sqlite-cache:table |
| 111 | + |
| 112 | +``` |
| 113 | + |
| 114 | +## Credits |
| 115 | + |
| 116 | +- IQBAL HASAN (the author of sqlite-cach package) |
| 117 | +- [Contributors](https://github.com/iqbalhasandev/laravel-sqlite-cache/graphs/contributors) |
| 118 | + |
| 119 | +## Support |
| 120 | + |
| 121 | +Hey dude! Don't forget to mail me if you have any problem with the package. |
| 122 | + |
| 123 | +- **Author E-mail **: [email protected] |
| 124 | +- **Author Facebook**: https://www.facebook.com/iqbalhasan.dev/ |
| 125 | +- **Author linkedin**: https://www.linkedin.com/in/iqbalhasandev |
| 126 | +- **Author github**: https://github.com/iqbalhasandev |
| 127 | +- **Author twitter**: https://twitter.com/iqbalhasandev |
| 128 | + |
| 129 | +## License |
| 130 | + |
| 131 | +This package inherits the licensing of its parent framework, Laravel, and as such is open-sourced |
| 132 | +software licensed under the [MIT license](http://opensource.org/licenses/MIT) |
| 133 | + |
| 134 | +## Extra |
| 135 | + |
| 136 | +If you want to contribute, you can |
| 137 | + |
| 138 | +Thank you for using this package😘 |
| 139 | +If you like it, don't forget to give a star⭐⭐⭐⭐⭐ |
0 commit comments