├── .env.example ├── .gitattributes ├── .gitignore ├── LICENSE.md ├── Procfile ├── README.md ├── app ├── Commands │ └── Command.php ├── Console │ ├── Commands │ │ └── Inspire.php │ └── Kernel.php ├── Events │ └── Event.php ├── Exceptions │ └── Handler.php ├── Gist.php ├── Handlers │ ├── Commands │ │ └── .gitkeep │ └── Events │ │ └── .gitkeep ├── Http │ ├── Controllers │ │ ├── Auth │ │ │ ├── AuthController.php │ │ │ └── PasswordController.php │ │ ├── Controller.php │ │ ├── GistController.php │ │ └── UserController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── RedirectIfAuthenticated.php │ │ └── VerifyCsrfToken.php │ ├── Requests │ │ ├── Request.php │ │ └── Web │ │ │ └── Gist │ │ │ └── GistCreateRequest.php │ └── routes.php ├── Library │ └── Helpers │ │ └── UuidGenerator.php ├── Presenters │ ├── GistPresenter.php │ └── UserPresenter.php ├── Providers │ ├── AppServiceProvider.php │ ├── BusServiceProvider.php │ ├── ConfigServiceProvider.php │ ├── EventServiceProvider.php │ ├── LogServiceProvider.php │ └── RouteServiceProvider.php ├── Repositories │ ├── BaseRepository.php │ ├── EloquentBaseRepository.php │ ├── Gist │ │ ├── EloquentGistRepository.php │ │ └── GistRepository.php │ ├── RepositoriesServiceProvider.php │ └── User │ │ ├── EloquentUserRepository.php │ │ └── UserRepository.php ├── Services │ └── Registrar.php ├── User.php └── UuidModel.php ├── artisan ├── bootstrap ├── app.php └── autoload.php ├── bower.json ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── cache.php ├── compile.php ├── database.php ├── filesystems.php ├── mail.php ├── queue.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── migrations │ ├── .gitkeep │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ └── 2015_03_12_090406_create_gists_table.php └── seeds │ ├── .gitkeep │ ├── DatabaseSeeder.php │ ├── GistTableSeeder.php │ └── UserTableSeeder.php ├── gulpfile.js ├── package.json ├── phpspec.yml ├── phpunit.xml ├── public ├── .htaccess ├── favicon.ico ├── index.php └── robots.txt ├── resources ├── assets │ └── sass │ │ ├── app.scss │ │ ├── app │ │ ├── gist.scss │ │ └── layout.scss │ │ └── vendor │ │ ├── bootstrap.scss │ │ └── get-shit-done │ │ ├── get-shit-done.scss │ │ ├── gsdk-base.scss │ │ ├── gsdk-checkbox-radio-switch.scss │ │ └── gsdk-sliders.scss ├── images │ └── .gitkeep ├── js │ └── get-shit-done │ │ ├── get-shit-done.js │ │ ├── gsdk-checkbox.js │ │ ├── gsdk-radio.js │ │ └── jquery-ui-1.10.4.custom.min.js ├── lang │ └── en │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── app.blade.php │ ├── app │ ├── _partials │ │ ├── _gist-list.blade.php │ │ ├── _sidebar-search.blade.php │ │ ├── _sidebar-tags.blade.php │ │ └── _sidebar-user-profile.blade.php │ ├── gists │ │ ├── gist-create.blade.php │ │ ├── gist-index.blade.php │ │ └── gist-show.blade.php │ └── users │ │ └── user-show.blade.php │ ├── auth │ ├── login.blade.php │ ├── password.blade.php │ ├── register.blade.php │ └── reset.blade.php │ ├── emails │ └── password.blade.php │ ├── errors │ └── 503.blade.php │ └── vendor │ └── .gitkeep ├── server.php ├── storage ├── .gitignore ├── app │ └── .gitignore ├── debugbar │ └── .gitignore ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore └── tests ├── ExampleTest.php ├── TestCase.php └── factories └── factories.php /.env.example: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_DEBUG=true 3 | APP_KEY=SomeRandomString 4 | 5 | DB_HOST=localhost 6 | DB_DATABASE=homestead 7 | DB_USERNAME=homestead 8 | DB_PASSWORD=secret 9 | 10 | CACHE_DRIVER=file 11 | SESSION_DRIVER=file 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore libs 2 | /vendor 3 | /node_modules 4 | /bower_components 5 | 6 | # Production stuffs 7 | /public/build 8 | /public/css 9 | /public/js 10 | /public/fonts 11 | 12 | # Ignore files 13 | .env 14 | storage/database.sqlite 15 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: vendor/bin/heroku-php-apache2 public -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Larask Gist - A Laravel 5 Github Gist Clone 2 | 3 | This is a simple project to create a Github Gist clone with Laravel 5 4 | 5 | # Installation (just like any Laravel 5 project) 6 | 7 | - Create project: `composer create-project larask/gist gist dev-master --prefer-dist` 8 | - Config your database credentials in .env file 9 | - `php artisan migrate` 10 | - Go to route `/trending` to see what we haved done. 11 | 12 | 13 | # Contributor 14 | - @luuhoangnam 15 | - @thangngoc89 16 | 17 | # Checklist 18 | 19 | - [x] Installation and Configuration 20 | - [x] Model and Migration 21 | - [x] Detour - Using UUID 22 | - [x] Database Seeder 23 | - [x] Routing - Controller 24 | - [x] View 25 | - [x] Front-end mockup 26 | 27 | # Screenshot 28 | 29 | ![image](https://cloud.githubusercontent.com/assets/3049054/6648112/7e0bd15a-ca08-11e4-8292-274225758948.png) 30 | 31 | ![image](https://cloud.githubusercontent.com/assets/3049054/6648114/8868a538-ca08-11e4-9692-83bad5d92778.png) 32 | 33 | ![image](https://cloud.githubusercontent.com/assets/3049054/6648126/a88a9632-ca08-11e4-9126-a1069d00af0c.png) 34 | 35 | # LICENSE 36 | 37 | GNU 2.0 - See [LICENSE](https://github.com/Larask/gist/blob/master/LICENSE.md) 38 | -------------------------------------------------------------------------------- /app/Commands/Command.php: -------------------------------------------------------------------------------- 1 | comment(PHP_EOL.Inspiring::quote().PHP_EOL); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 26 | ->hourly(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /app/Events/Event.php: -------------------------------------------------------------------------------- 1 | 'boolean' 25 | ]; 26 | 27 | /** 28 | * The attributes that are mass assignable. 29 | * 30 | * @var array 31 | */ 32 | protected $fillable = ['content','title']; 33 | 34 | /** 35 | * The attributes that aren't mass assignable. 36 | * 37 | * @var array 38 | */ 39 | protected $guarded = ['user_id']; 40 | 41 | protected $presenter = GistPresenter::class; 42 | /** 43 | * @return \Illuminate\Database\Eloquent\Relations\BelongsTo 44 | */ 45 | public function user() 46 | { 47 | return $this->belongsTo('Gist\User'); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/Handlers/Commands/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larask/gist/70d128ecea9f27de591eb8105394fd62bc97649c/app/Handlers/Commands/.gitkeep -------------------------------------------------------------------------------- /app/Handlers/Events/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larask/gist/70d128ecea9f27de591eb8105394fd62bc97649c/app/Handlers/Events/.gitkeep -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/AuthController.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 33 | $this->registrar = $registrar; 34 | 35 | $this->middleware('guest', ['except' => 'getLogout']); 36 | } 37 | 38 | public function redirectPath() 39 | { 40 | if (property_exists($this, 'redirectPath')) 41 | { 42 | return $this->redirectPath; 43 | } 44 | 45 | return property_exists($this, 'redirectTo') ? $this->redirectTo : '/'; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/PasswordController.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 33 | $this->passwords = $passwords; 34 | 35 | $this->middleware('guest'); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | gist = $gist; 30 | $this->user = $user; 31 | } 32 | /** 33 | * Display a listing of the resource. 34 | * 35 | * @return Response 36 | */ 37 | public function index() 38 | { 39 | $gists = $this->gist->with('user')->getPublicGistsWithPaginate(); 40 | 41 | return view('app.gists.gist-index', compact('gists')); 42 | } 43 | 44 | /** 45 | * Show the form for creating a new resource. 46 | * 47 | * @return Response 48 | */ 49 | public function create() 50 | { 51 | return view('app.gists.gist-create'); 52 | } 53 | 54 | /** 55 | * Store a newly created resource in storage. 56 | * 57 | * @return Response 58 | */ 59 | public function store(GistCreateRequest $request) 60 | { 61 | $user = $this->user->getUserFromRequest($request); 62 | 63 | $gist = $this->gist->createWithUserId($request->all(), $user->id); 64 | 65 | return redirect($gist->present()->link); 66 | } 67 | 68 | /** 69 | * Display the specified resource. 70 | * 71 | * @param int $id 72 | * @return Response 73 | */ 74 | public function show($user, $gist) 75 | { 76 | return [ 77 | 'user' => $user, 78 | 'gist' => $gist, 79 | ]; 80 | } 81 | 82 | /** 83 | * Show the form for editing the specified resource. 84 | * 85 | * @param int $id 86 | * @return Response 87 | */ 88 | public function edit($id) 89 | { 90 | // 91 | } 92 | 93 | /** 94 | * Update the specified resource in storage. 95 | * 96 | * @param int $id 97 | * @return Response 98 | */ 99 | public function update($id) 100 | { 101 | // 102 | } 103 | 104 | /** 105 | * Remove the specified resource from storage. 106 | * 107 | * @param int $id 108 | * @return Response 109 | */ 110 | public function destroy($id) 111 | { 112 | // 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /app/Http/Controllers/UserController.php: -------------------------------------------------------------------------------- 1 | user = $user; 29 | $this->gist = $gist; 30 | } 31 | /** 32 | * Display a listing of the resource. 33 | * 34 | * @return Response 35 | */ 36 | public function index() 37 | { 38 | $users = $this->user->all(); 39 | 40 | return $users; 41 | } 42 | 43 | /** 44 | * Display the specified resource. 45 | * 46 | * @param \Gist\User $user 47 | * @return Response 48 | */ 49 | public function show($user) 50 | { 51 | $gists = $this->gist->getByUserIdWithPaginate($user->id); 52 | 53 | return view('app.users.user-show', compact('user','gists')); 54 | } 55 | 56 | /** 57 | * Show the form for editing the specified resource. 58 | * 59 | * @param int $id 60 | * @return Response 61 | */ 62 | public function edit($id) 63 | { 64 | // 65 | } 66 | 67 | /** 68 | * Update the specified resource in storage. 69 | * 70 | * @param int $id 71 | * @return Response 72 | */ 73 | public function update($id) 74 | { 75 | // 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | 'Gist\Http\Middleware\Authenticate', 28 | 'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth', 29 | 'guest' => 'Gist\Http\Middleware\RedirectIfAuthenticated', 30 | ]; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 24 | } 25 | 26 | /** 27 | * Handle an incoming request. 28 | * 29 | * @param \Illuminate\Http\Request $request 30 | * @param \Closure $next 31 | * @return mixed 32 | */ 33 | public function handle($request, Closure $next) 34 | { 35 | if ($this->auth->guest()) 36 | { 37 | if ($request->ajax()) 38 | { 39 | return response('Unauthorized.', 401); 40 | } 41 | else 42 | { 43 | return redirect()->guest('auth/login'); 44 | } 45 | } 46 | 47 | return $next($request); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 25 | } 26 | 27 | /** 28 | * Handle an incoming request. 29 | * 30 | * @param \Illuminate\Http\Request $request 31 | * @param \Closure $next 32 | * @return mixed 33 | */ 34 | public function handle($request, Closure $next) 35 | { 36 | if ($this->auth->check()) 37 | { 38 | return new RedirectResponse(url('/home')); 39 | } 40 | 41 | return $next($request); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | ajax() || $this->wantsJson()) 11 | { 12 | return new JsonResponse(['errors' => $errors], 422); 13 | } 14 | 15 | return $this->redirector->to($this->getRedirectUrl()) 16 | ->withInput($this->except($this->dontFlash)) 17 | ->withErrors($errors, $this->errorBag); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Requests/Web/Gist/GistCreateRequest.php: -------------------------------------------------------------------------------- 1 | 'required|min:10', 27 | 'title' => 'min:5' 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/routes.php: -------------------------------------------------------------------------------- 1 | 'Auth\AuthController', 17 | 'password' => 'Auth\PasswordController', 18 | ]); 19 | 20 | Route::get('trending', ['uses' => 'GistController@index', 'as' => 'gist.index']); 21 | Route::get('/', ['uses' => 'GistController@create', 'as' => 'gist.create']); 22 | Route::post('/', ['uses' => 'GistController@store', 'as' => 'gist.store']); 23 | Route::get('@{username}/{gistId}', ['uses' => 'GistController@show', 'as' => 'gist.show']); 24 | 25 | Route::get('users', ['uses' => 'UserController@index', 'as' => 'user.index']); 26 | Route::get('@{username}', ['uses' => 'UserController@show', 'as' => 'user.show']); -------------------------------------------------------------------------------- /app/Library/Helpers/UuidGenerator.php: -------------------------------------------------------------------------------- 1 | $this->user->username, 12 | 'gistId' => substr( $this->id, 0, 7 ) 13 | ]; 14 | return route('gist.show', $routeData); 15 | } 16 | 17 | public function accountAge() 18 | { 19 | return $this->created_at->diffForHumans(); 20 | } 21 | } -------------------------------------------------------------------------------- /app/Presenters/UserPresenter.php: -------------------------------------------------------------------------------- 1 | username); 11 | } 12 | } -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->bind( 36 | 'Illuminate\Contracts\Auth\Registrar', 37 | 'Gist\Services\Registrar' 38 | ); 39 | 40 | if ($this->app->environment() == 'local') { 41 | $this->app->register('Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider'); 42 | $this->app->register('Laracasts\Generators\GeneratorsServiceProvider'); 43 | $this->app->register('Barryvdh\Debugbar\ServiceProvider'); 44 | } 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /app/Providers/BusServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapUsing(function($command) 17 | { 18 | return Dispatcher::simpleMapping( 19 | $command, 'Gist\Commands', 'Gist\Handlers\Commands' 20 | ); 21 | }); 22 | } 23 | 24 | /** 25 | * Register any application services. 26 | * 27 | * @return void 28 | */ 29 | public function register() 30 | { 31 | // 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/Providers/ConfigServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 15 | 'EventListener', 16 | ], 17 | ]; 18 | 19 | /** 20 | * Register any other events for your application. 21 | * 22 | * @param \Illuminate\Contracts\Events\Dispatcher $events 23 | * @return void 24 | */ 25 | public function boot(DispatcherContract $events) 26 | { 27 | parent::boot($events); 28 | 29 | // 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/Providers/LogServiceProvider.php: -------------------------------------------------------------------------------- 1 | bootLoggly(); 24 | } 25 | 26 | /** 27 | * Register the application services. 28 | * 29 | * @return void 30 | */ 31 | public function register() 32 | { 33 | // 34 | } 35 | 36 | private function bootLoggly() 37 | { 38 | $logglyHandler = new LogglyHandler(config('services.loggly.token')); 39 | $logglyHandler->setFormatter(new LogglyFormatter); 40 | 41 | \Log::getMonolog()->pushHandler($logglyHandler); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | bindUsername($router); 31 | 32 | $router->bind('gistId', function($gistId) 33 | { 34 | // TODO: Weird stuff. Can't pass it via route pattern 35 | if ( ! preg_match('/^[a-z0-9]{7,7}$/', $gistId) ) 36 | abort(404); 37 | 38 | $gist = Gist::where('id','like', $gistId . '%')->first(); 39 | 40 | if ( is_null($gist) ) 41 | abort(404); 42 | 43 | return $gist; 44 | }); 45 | } 46 | 47 | /** 48 | * Define the routes for the application. 49 | * 50 | * @param \Illuminate\Routing\Router $router 51 | * @return void 52 | */ 53 | public function map(Router $router) 54 | { 55 | $router->group(['namespace' => $this->namespace], function($router) 56 | { 57 | require app_path('Http/routes.php'); 58 | }); 59 | } 60 | 61 | /** 62 | * @param Router $router 63 | */ 64 | private function bindUsername(Router $router) 65 | { 66 | $router->bind('username', function ($username) { 67 | $user = User::where('username', '=', $username)->first(); 68 | 69 | if (is_null($user)) { 70 | abort(404); 71 | } 72 | 73 | return $user; 74 | }); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /app/Repositories/BaseRepository.php: -------------------------------------------------------------------------------- 1 | model->all(); 14 | } 15 | 16 | public function create(array $attributes = array()) 17 | { 18 | return $this->model->create($attributes); 19 | } 20 | 21 | public function update(array $attributes = array()) 22 | { 23 | return $this->model->update($attributes); 24 | } 25 | 26 | public function delete() 27 | { 28 | return $this->model->delete(); 29 | } 30 | 31 | public function with($relations) 32 | { 33 | if (is_string($relations)) 34 | { 35 | $relations = func_get_args(); 36 | } 37 | 38 | $this->model = $this->model->with($relations); 39 | 40 | return $this; 41 | } 42 | } -------------------------------------------------------------------------------- /app/Repositories/Gist/EloquentGistRepository.php: -------------------------------------------------------------------------------- 1 | model = $model; 21 | } 22 | 23 | /** 24 | * Get all public gists with paginate 25 | * @return \Illuminate\Database\Eloquent\Collection 26 | */ 27 | public function getPublicGistsWithPaginate($paginate = 20, $order = 'DESC') 28 | { 29 | return $this->model->wherePublic(true)->orderBy('created_at', $order)->paginate($paginate); 30 | } 31 | 32 | /** 33 | * @param array $attributes 34 | * @return mixed 35 | */ 36 | public function createWithUserId(array $attributes, $userId) 37 | { 38 | if (is_null($userId)) { 39 | throw new \BadMethodCallException('UserId can not be null'); 40 | } 41 | $gist = $this->model; 42 | $gist->content = $attributes['content']; 43 | $gist->title = ($attributes['title']) ?: 'Untitled'; 44 | $gist->public = (boolean) $attributes['public']; 45 | $gist->user_id = $userId; 46 | $gist->save(); 47 | 48 | return $gist; 49 | } 50 | 51 | /** 52 | * Get all gist create by user with paginate 53 | * 54 | * @param int $userId 55 | * @return \Illuminate\Database\Eloquent\Collection 56 | */ 57 | public function getByUserIdWithPaginate($userId, $paginate = 20, $order = 'DESC') 58 | { 59 | return $this->model->whereUserId($userId)->orderBy($order)->paginate($paginate); 60 | } 61 | } -------------------------------------------------------------------------------- /app/Repositories/Gist/GistRepository.php: -------------------------------------------------------------------------------- 1 | app->bind( 30 | GistRepository::class, 31 | EloquentGistRepository::class 32 | ); 33 | 34 | $this->app->bind( 35 | UserRepository::class, 36 | EloquentUserRepository::class 37 | ); 38 | } 39 | 40 | } -------------------------------------------------------------------------------- /app/Repositories/User/EloquentUserRepository.php: -------------------------------------------------------------------------------- 1 | model = $model; 20 | } 21 | 22 | /** 23 | * Find anonymous user 24 | * 25 | * @return \Gist\User 26 | */ 27 | public function getAnonymousUser() 28 | { 29 | $user = $this->model->whereUsername('anonymous')->first(); 30 | 31 | if (is_null($user)) { 32 | throw new \Exception('No anonymous user'); 33 | } 34 | 35 | return $user; 36 | } 37 | 38 | /** 39 | * Get user from request or return anonymous user 40 | * 41 | * @param $request \Illuminate\Http\Request 42 | * @return \Gist\User 43 | */ 44 | public function getUserFromRequest($request) 45 | { 46 | if ($user = $request->user()) { 47 | return $user; 48 | } 49 | 50 | return $this->getAnonymousUser(); 51 | } 52 | } -------------------------------------------------------------------------------- /app/Repositories/User/UserRepository.php: -------------------------------------------------------------------------------- 1 | 'required|alpha_num|max:20|unique:users,username', 20 | 'name' => 'required|max:255', 21 | 'email' => 'required|email|max:255|unique:users', 22 | 'password' => 'required|confirmed|min:6', 23 | ]); 24 | } 25 | 26 | /** 27 | * Create a new user instance after a valid registration. 28 | * 29 | * @param array $data 30 | * @return User 31 | */ 32 | public function create(array $data) 33 | { 34 | return User::create([ 35 | 'username' => $data['username'], 36 | 'name' => $data['name'], 37 | 'email' => $data['email'], 38 | 'password' => bcrypt($data['password']), 39 | ]); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | hasMany('Gist\Gist'); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /app/UuidModel.php: -------------------------------------------------------------------------------- 1 | {$model->getKeyName()} = UuidGenerator::generate($model); 16 | 17 | }); 18 | } 19 | } -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make('Illuminate\Contracts\Console\Kernel'); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | 'Illuminate\Contracts\Http\Kernel', 31 | 'Gist\Http\Kernel' 32 | ); 33 | 34 | $app->singleton( 35 | 'Illuminate\Contracts\Console\Kernel', 36 | 'Gist\Console\Kernel' 37 | ); 38 | 39 | $app->singleton( 40 | 'Illuminate\Contracts\Debug\ExceptionHandler', 41 | 'Gist\Exceptions\Handler' 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | ", 7 | "Khoa Dang Nguyen " 8 | ], 9 | "license": "MIT", 10 | "ignore": [ 11 | "**/.*", 12 | "node_modules", 13 | "bower_components", 14 | "test", 15 | "tests" 16 | ], 17 | "dependencies": { 18 | "bootstrap-sass": "~3.3.3", 19 | "ace-builds": "~1.1.8" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "larask/gist", 3 | "description": "A Laravel 5 Github Gist Clone from Larask Team.", 4 | "keywords": [ 5 | "laravel", 6 | "larask", 7 | "gist", 8 | "laravel vietnam" 9 | ], 10 | "license": "MIT", 11 | "type": "project", 12 | "require": { 13 | "laravel/framework": "5.0.*", 14 | "webpatser/laravel-uuid": "~1.4", 15 | "laravelcollective/html": "~5.0", 16 | "laracasts/presenter": "0.2.*" 17 | }, 18 | "require-dev": { 19 | "phpunit/phpunit": "~4.0", 20 | "phpspec/phpspec": "~2.1", 21 | "behat/behat": "~3.0", 22 | "behat/mink": "~1.6", 23 | "barryvdh/laravel-ide-helper": "~2.0", 24 | "laracasts/generators": "~1.1", 25 | "laracasts/testdummy": "~2.1", 26 | "doctrine/dbal": "~2.5", 27 | "barryvdh/laravel-debugbar": "~2.0" 28 | }, 29 | "autoload": { 30 | "classmap": [ 31 | "database" 32 | ], 33 | "psr-4": { 34 | "Gist\\": "app/" 35 | } 36 | }, 37 | "autoload-dev": { 38 | "classmap": [ 39 | "tests/TestCase.php" 40 | ] 41 | }, 42 | "scripts": { 43 | "post-install-cmd": [ 44 | "php artisan clear-compiled", 45 | "php artisan optimize" 46 | ], 47 | "post-update-cmd": [ 48 | "php artisan clear-compiled", 49 | "php artisan optimize" 50 | ], 51 | "post-create-project-cmd": [ 52 | "php -r \"copy('.env.example', '.env');\"", 53 | "php artisan key:generate", 54 | "npm install", 55 | "npm install bower", 56 | "bower install", 57 | "gulp" 58 | ] 59 | }, 60 | "config": { 61 | "preferred-install": "dist" 62 | }, 63 | "minimum-stability": "stable" 64 | } 65 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_DEBUG'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application URL 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This URL is used by the console to properly generate URLs when using 24 | | the Artisan command line tool. You should set this to the root of 25 | | your application so that it is used when running Artisan tasks. 26 | | 27 | */ 28 | 29 | 'url' => 'http://localhost', 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application Timezone 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may specify the default timezone for your application, which 37 | | will be used by the PHP date and date-time functions. We have gone 38 | | ahead and set this to a sensible default for you out of the box. 39 | | 40 | */ 41 | 42 | 'timezone' => 'UTC', 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Application Locale Configuration 47 | |-------------------------------------------------------------------------- 48 | | 49 | | The application locale determines the default locale that will be used 50 | | by the translation service provider. You are free to set this value 51 | | to any of the locales which will be supported by the application. 52 | | 53 | */ 54 | 55 | 'locale' => 'en', 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Application Fallback Locale 60 | |-------------------------------------------------------------------------- 61 | | 62 | | The fallback locale determines the locale to use when the current one 63 | | is not available. You may change the value to correspond to any of 64 | | the language folders that are provided through your application. 65 | | 66 | */ 67 | 68 | 'fallback_locale' => 'en', 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Encryption Key 73 | |-------------------------------------------------------------------------- 74 | | 75 | | This key is used by the Illuminate encrypter service and should be set 76 | | to a random, 32 character string, otherwise these encrypted strings 77 | | will not be safe. Please do this before deploying an application! 78 | | 79 | */ 80 | 81 | 'key' => env('APP_KEY', 'SomeRandomString'), 82 | 83 | 'cipher' => MCRYPT_RIJNDAEL_128, 84 | 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | Logging Configuration 88 | |-------------------------------------------------------------------------- 89 | | 90 | | Here you may configure the log settings for your application. Out of 91 | | the box, Laravel uses the Monolog PHP logging library. This gives 92 | | you a variety of powerful log handlers / formatters to utilize. 93 | | 94 | | Available Settings: "single", "daily", "syslog", "errorlog" 95 | | 96 | */ 97 | 98 | 'log' => 'daily', 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | Autoloaded Service Providers 103 | |-------------------------------------------------------------------------- 104 | | 105 | | The service providers listed here will be automatically loaded on the 106 | | request to your application. Feel free to add your own services to 107 | | this array to grant expanded functionality to your applications. 108 | | 109 | */ 110 | 111 | 'providers' => [ 112 | 113 | /* 114 | * Laravel Framework Service Providers... 115 | */ 116 | 'Illuminate\Foundation\Providers\ArtisanServiceProvider', 117 | 'Illuminate\Auth\AuthServiceProvider', 118 | 'Illuminate\Bus\BusServiceProvider', 119 | 'Illuminate\Cache\CacheServiceProvider', 120 | 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', 121 | 'Illuminate\Routing\ControllerServiceProvider', 122 | 'Illuminate\Cookie\CookieServiceProvider', 123 | 'Illuminate\Database\DatabaseServiceProvider', 124 | 'Illuminate\Encryption\EncryptionServiceProvider', 125 | 'Illuminate\Filesystem\FilesystemServiceProvider', 126 | 'Illuminate\Foundation\Providers\FoundationServiceProvider', 127 | 'Illuminate\Hashing\HashServiceProvider', 128 | 'Illuminate\Mail\MailServiceProvider', 129 | 'Illuminate\Pagination\PaginationServiceProvider', 130 | 'Illuminate\Pipeline\PipelineServiceProvider', 131 | 'Illuminate\Queue\QueueServiceProvider', 132 | 'Illuminate\Redis\RedisServiceProvider', 133 | 'Illuminate\Auth\Passwords\PasswordResetServiceProvider', 134 | 'Illuminate\Session\SessionServiceProvider', 135 | 'Illuminate\Translation\TranslationServiceProvider', 136 | 'Illuminate\Validation\ValidationServiceProvider', 137 | 'Illuminate\View\ViewServiceProvider', 138 | 'Collective\Html\HtmlServiceProvider', 139 | /* 140 | * Application Service Providers... 141 | */ 142 | 'Gist\Providers\AppServiceProvider', 143 | 'Gist\Providers\BusServiceProvider', 144 | 'Gist\Providers\ConfigServiceProvider', 145 | 'Gist\Providers\EventServiceProvider', 146 | 'Gist\Providers\RouteServiceProvider', 147 | 'Gist\Repositories\RepositoriesServiceProvider', 148 | 149 | ], 150 | 151 | /* 152 | |-------------------------------------------------------------------------- 153 | | Class Aliases 154 | |-------------------------------------------------------------------------- 155 | | 156 | | This array of class aliases will be registered when this application 157 | | is started. However, feel free to register as many as you wish as 158 | | the aliases are "lazy" loaded so they don't hinder performance. 159 | | 160 | */ 161 | 162 | 'aliases' => [ 163 | 164 | 'App' => 'Illuminate\Support\Facades\App', 165 | 'Artisan' => 'Illuminate\Support\Facades\Artisan', 166 | 'Auth' => 'Illuminate\Support\Facades\Auth', 167 | 'Blade' => 'Illuminate\Support\Facades\Blade', 168 | 'Bus' => 'Illuminate\Support\Facades\Bus', 169 | 'Cache' => 'Illuminate\Support\Facades\Cache', 170 | 'Config' => 'Illuminate\Support\Facades\Config', 171 | 'Cookie' => 'Illuminate\Support\Facades\Cookie', 172 | 'Crypt' => 'Illuminate\Support\Facades\Crypt', 173 | 'DB' => 'Illuminate\Support\Facades\DB', 174 | 'Eloquent' => 'Illuminate\Database\Eloquent\Model', 175 | 'Event' => 'Illuminate\Support\Facades\Event', 176 | 'File' => 'Illuminate\Support\Facades\File', 177 | 'Hash' => 'Illuminate\Support\Facades\Hash', 178 | 'Input' => 'Illuminate\Support\Facades\Input', 179 | 'Inspiring' => 'Illuminate\Foundation\Inspiring', 180 | 'Lang' => 'Illuminate\Support\Facades\Lang', 181 | 'Log' => 'Illuminate\Support\Facades\Log', 182 | 'Mail' => 'Illuminate\Support\Facades\Mail', 183 | 'Password' => 'Illuminate\Support\Facades\Password', 184 | 'Queue' => 'Illuminate\Support\Facades\Queue', 185 | 'Redirect' => 'Illuminate\Support\Facades\Redirect', 186 | 'Redis' => 'Illuminate\Support\Facades\Redis', 187 | 'Request' => 'Illuminate\Support\Facades\Request', 188 | 'Response' => 'Illuminate\Support\Facades\Response', 189 | 'Route' => 'Illuminate\Support\Facades\Route', 190 | 'Schema' => 'Illuminate\Support\Facades\Schema', 191 | 'Session' => 'Illuminate\Support\Facades\Session', 192 | 'Storage' => 'Illuminate\Support\Facades\Storage', 193 | 'URL' => 'Illuminate\Support\Facades\URL', 194 | 'Validator' => 'Illuminate\Support\Facades\Validator', 195 | 'View' => 'Illuminate\Support\Facades\View', 196 | 'Form' => 'Collective\Html\FormFacade', 197 | 'Html' => 'Collective\Html\HtmlFacade', 198 | ], 199 | 200 | ]; 201 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | 'eloquent', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Authentication Model 23 | |-------------------------------------------------------------------------- 24 | | 25 | | When using the "Eloquent" authentication driver, we need to know which 26 | | Eloquent model should be used to retrieve your users. Of course, it 27 | | is often just the "User" model but you may use whatever you like. 28 | | 29 | */ 30 | 31 | 'model' => 'Gist\User', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Authentication Table 36 | |-------------------------------------------------------------------------- 37 | | 38 | | When using the "Database" authentication driver, we need to know which 39 | | table should be used to retrieve your users. We have chosen a basic 40 | | default value but you may easily change it to any table you like. 41 | | 42 | */ 43 | 44 | 'table' => 'users', 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Password Reset Settings 49 | |-------------------------------------------------------------------------- 50 | | 51 | | Here you may set the options for resetting passwords including the view 52 | | that is your password reset e-mail. You can also set the name of the 53 | | table that maintains all of the reset tokens for your application. 54 | | 55 | | The expire time is the number of minutes that the reset token should be 56 | | considered valid. This security feature keeps tokens short-lived so 57 | | they have less time to be guessed. You may change this as needed. 58 | | 59 | */ 60 | 61 | 'password' => [ 62 | 'email' => 'emails.password', 63 | 'table' => 'password_resets', 64 | 'expire' => 60, 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Cache Stores 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the cache "stores" for your application as 24 | | well as their drivers. You may even define multiple stores for the 25 | | same cache driver to group types of items stored in your caches. 26 | | 27 | */ 28 | 29 | 'stores' => [ 30 | 31 | 'apc' => [ 32 | 'driver' => 'apc' 33 | ], 34 | 35 | 'array' => [ 36 | 'driver' => 'array' 37 | ], 38 | 39 | 'database' => [ 40 | 'driver' => 'database', 41 | 'table' => 'cache', 42 | 'connection' => null, 43 | ], 44 | 45 | 'file' => [ 46 | 'driver' => 'file', 47 | 'path' => storage_path().'/framework/cache', 48 | ], 49 | 50 | 'memcached' => [ 51 | 'driver' => 'memcached', 52 | 'servers' => [ 53 | [ 54 | 'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100 55 | ], 56 | ], 57 | ], 58 | 59 | 'redis' => [ 60 | 'driver' => 'redis', 61 | 'connection' => 'default', 62 | ], 63 | 64 | ], 65 | 66 | /* 67 | |-------------------------------------------------------------------------- 68 | | Cache Key Prefix 69 | |-------------------------------------------------------------------------- 70 | | 71 | | When utilizing a RAM based store such as APC or Memcached, there might 72 | | be other applications utilizing the same cache. So, we'll specify a 73 | | value to get prefixed to all our keys so we can avoid collisions. 74 | | 75 | */ 76 | 77 | 'prefix' => 'laravel', 78 | 79 | ]; 80 | -------------------------------------------------------------------------------- /config/compile.php: -------------------------------------------------------------------------------- 1 | [ 17 | 18 | realpath(__DIR__.'/../app/Providers/AppServiceProvider.php'), 19 | realpath(__DIR__.'/../app/Providers/BusServiceProvider.php'), 20 | realpath(__DIR__.'/../app/Providers/ConfigServiceProvider.php'), 21 | realpath(__DIR__.'/../app/Providers/EventServiceProvider.php'), 22 | realpath(__DIR__.'/../app/Providers/RouteServiceProvider.php'), 23 | 24 | ], 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Compiled File Providers 29 | |-------------------------------------------------------------------------- 30 | | 31 | | Here you may list service providers which define a "compiles" function 32 | | that returns additional files that should be compiled, providing an 33 | | easy way to get common files from any packages you are utilizing. 34 | | 35 | */ 36 | 37 | 'providers' => [ 38 | // 39 | ], 40 | 41 | ]; 42 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | PDO::FETCH_CLASS, 17 | /* 18 | |-------------------------------------------------------------------------- 19 | | Default Database Connection Name 20 | |-------------------------------------------------------------------------- 21 | | 22 | | Here you may specify which of the database connections below you wish 23 | | to use as your default connection for all database work. Of course 24 | | you may use many connections at once using the Database library. 25 | | 26 | */ 27 | 28 | 'default' => env('DB_DEFAULT', 'mysql'), 29 | /* 30 | |-------------------------------------------------------------------------- 31 | | Database Connections 32 | |-------------------------------------------------------------------------- 33 | | 34 | | Here are each of the database connections setup for your application. 35 | | Of course, examples of configuring each database platform that is 36 | | supported by Laravel is shown below to make development simple. 37 | | 38 | | 39 | | All database work in Laravel is done through the PHP PDO facilities 40 | | so make sure you have the driver for your particular database of 41 | | choice installed on your machine before you begin development. 42 | | 43 | */ 44 | 45 | 'connections' => [ 46 | 47 | 'sqlite' => [ 48 | 'driver' => 'sqlite', 49 | 'database' => storage_path('SQLITE_DATABASE', 'database.sqlite'), 50 | 'prefix' => '', 51 | ], 52 | 'mysql' => [ 53 | 'driver' => 'mysql', 54 | 'host' => env('DB_HOST', 'localhost'), 55 | 'database' => env('DB_DATABASE', 'forge'), 56 | 'username' => env('DB_USERNAME', 'forge'), 57 | 'password' => env('DB_PASSWORD', ''), 58 | 'charset' => 'utf8', 59 | 'collation' => 'utf8_unicode_ci', 60 | 'prefix' => '', 61 | 'strict' => false, 62 | ], 63 | 'pgsql' => [ 64 | 'driver' => 'pgsql', 65 | 'host' => env('DB_HOST', 'localhost'), 66 | 'database' => env('DB_DATABASE', 'forge'), 67 | 'username' => env('DB_USERNAME', 'forge'), 68 | 'password' => env('DB_PASSWORD', ''), 69 | 'charset' => 'utf8', 70 | 'prefix' => '', 71 | 'schema' => 'public', 72 | ], 73 | 'sqlsrv' => [ 74 | 'driver' => 'sqlsrv', 75 | 'host' => env('DB_HOST', 'localhost'), 76 | 'database' => env('DB_DATABASE', 'forge'), 77 | 'username' => env('DB_USERNAME', 'forge'), 78 | 'password' => env('DB_PASSWORD', ''), 79 | 'prefix' => '', 80 | ], 81 | 82 | ], 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Migration Repository Table 86 | |-------------------------------------------------------------------------- 87 | | 88 | | This table keeps track of all the migrations that have already run for 89 | | your application. Using this information, we can determine which of 90 | | the migrations on disk haven't actually been run in the database. 91 | | 92 | */ 93 | 94 | 'migrations' => 'migrations', 95 | /* 96 | |-------------------------------------------------------------------------- 97 | | Redis Databases 98 | |-------------------------------------------------------------------------- 99 | | 100 | | Redis is an open source, fast, and advanced key-value store that also 101 | | provides a richer set of commands than a typical key-value systems 102 | | such as APC or Memcached. Laravel makes it easy to dig right in. 103 | | 104 | */ 105 | 106 | 'redis' => [ 107 | 108 | 'cluster' => false, 109 | 'default' => [ 110 | 'host' => '127.0.0.1', 111 | 'port' => 6379, 112 | 'database' => 0, 113 | ], 114 | 115 | ], 116 | 117 | ]; 118 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | 'local', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Default Cloud Filesystem Disk 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Many applications store files both locally and in the cloud. For this 26 | | reason, you may specify a default "cloud" driver here. This driver 27 | | will be bound as the Cloud disk implementation in the container. 28 | | 29 | */ 30 | 31 | 'cloud' => 's3', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Filesystem Disks 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Here you may configure as many filesystem "disks" as you wish, and you 39 | | may even configure multiple disks of the same driver. Defaults have 40 | | been setup for each driver as an example of the required options. 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path().'/app', 49 | ], 50 | 51 | 's3' => [ 52 | 'driver' => 's3', 53 | 'key' => 'your-key', 54 | 'secret' => 'your-secret', 55 | 'region' => 'your-region', 56 | 'bucket' => 'your-bucket', 57 | ], 58 | 59 | 'rackspace' => [ 60 | 'driver' => 'rackspace', 61 | 'username' => 'your-username', 62 | 'key' => 'your-key', 63 | 'container' => 'your-container', 64 | 'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/', 65 | 'region' => 'IAD', 66 | ], 67 | 68 | ], 69 | 70 | ]; 71 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | 'smtp', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | SMTP Host Address 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may provide the host address of the SMTP server used by your 26 | | applications. A default option is provided that is compatible with 27 | | the Mailgun mail service which will provide reliable deliveries. 28 | | 29 | */ 30 | 31 | 'host' => 'smtp.mailgun.org', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | SMTP Host Port 36 | |-------------------------------------------------------------------------- 37 | | 38 | | This is the SMTP port used by your application to deliver e-mails to 39 | | users of the application. Like the host we have set this value to 40 | | stay compatible with the Mailgun e-mail application by default. 41 | | 42 | */ 43 | 44 | 'port' => 587, 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Global "From" Address 49 | |-------------------------------------------------------------------------- 50 | | 51 | | You may wish for all e-mails sent by your application to be sent from 52 | | the same address. Here, you may specify a name and address that is 53 | | used globally for all e-mails that are sent by your application. 54 | | 55 | */ 56 | 57 | 'from' => ['address' => null, 'name' => null], 58 | 59 | /* 60 | |-------------------------------------------------------------------------- 61 | | E-Mail Encryption Protocol 62 | |-------------------------------------------------------------------------- 63 | | 64 | | Here you may specify the encryption protocol that should be used when 65 | | the application send e-mail messages. A sensible default using the 66 | | transport layer security protocol should provide great security. 67 | | 68 | */ 69 | 70 | 'encryption' => 'tls', 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | SMTP Server Username 75 | |-------------------------------------------------------------------------- 76 | | 77 | | If your SMTP server requires a username for authentication, you should 78 | | set it here. This will get used to authenticate with your server on 79 | | connection. You may also set the "password" value below this one. 80 | | 81 | */ 82 | 83 | 'username' => null, 84 | 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | SMTP Server Password 88 | |-------------------------------------------------------------------------- 89 | | 90 | | Here you may set the password required by your SMTP server to send out 91 | | messages from your application. This will be given to the server on 92 | | connection so that the application will be able to send messages. 93 | | 94 | */ 95 | 96 | 'password' => null, 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Sendmail System Path 101 | |-------------------------------------------------------------------------- 102 | | 103 | | When using the "sendmail" driver to send e-mails, we will need to know 104 | | the path to where Sendmail lives on this server. A default path has 105 | | been provided here, which will work well on most of your systems. 106 | | 107 | */ 108 | 109 | 'sendmail' => '/usr/sbin/sendmail -bs', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Mail "Pretend" 114 | |-------------------------------------------------------------------------- 115 | | 116 | | When this option is enabled, e-mail will not actually be sent over the 117 | | web and will instead be written to your application's logs files so 118 | | you may inspect the message. This is great for local development. 119 | | 120 | */ 121 | 122 | 'pretend' => false, 123 | 124 | ]; 125 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Queue Connections 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may configure the connection information for each server that 27 | | is used by your application. A default configuration has been added 28 | | for each back-end shipped with Laravel. You are free to add more. 29 | | 30 | */ 31 | 32 | 'connections' => [ 33 | 34 | 'sync' => [ 35 | 'driver' => 'sync', 36 | ], 37 | 38 | 'database' => [ 39 | 'driver' => 'database', 40 | 'table' => 'jobs', 41 | 'queue' => 'default', 42 | 'expire' => 60, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'ttr' => 60, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => 'your-public-key', 55 | 'secret' => 'your-secret-key', 56 | 'queue' => 'your-queue-url', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'iron' => [ 61 | 'driver' => 'iron', 62 | 'host' => 'mq-aws-us-east-1.iron.io', 63 | 'token' => 'your-token', 64 | 'project' => 'your-project-id', 65 | 'queue' => 'your-queue-name', 66 | 'encrypt' => true, 67 | ], 68 | 69 | 'redis' => [ 70 | 'driver' => 'redis', 71 | 'queue' => 'default', 72 | 'expire' => 60, 73 | ], 74 | 75 | ], 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Failed Queue Jobs 80 | |-------------------------------------------------------------------------- 81 | | 82 | | These options configure the behavior of failed queue job logging so you 83 | | can control which database and table are used to store the jobs that 84 | | have failed. You may change them to any database / table you wish. 85 | | 86 | */ 87 | 88 | 'failed' => [ 89 | 'database' => 'mysql', 'table' => 'failed_jobs', 90 | ], 91 | 92 | ]; 93 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => '', 19 | 'secret' => '', 20 | ], 21 | 'mandrill' => [ 22 | 'secret' => '', 23 | ], 24 | 'ses' => [ 25 | 'key' => '', 26 | 'secret' => '', 27 | 'region' => 'us-east-1', 28 | ], 29 | 'stripe' => [ 30 | 'model' => 'User', 31 | 'secret' => '', 32 | ], 33 | 'loggly' => [ 34 | 'token' => env('LOGGLY_TOKEN'), 35 | ], 36 | 37 | ]; 38 | -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Session Lifetime 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may specify the number of minutes that you wish the session 27 | | to be allowed to remain idle before it expires. If you want them 28 | | to immediately expire on the browser closing, set that option. 29 | | 30 | */ 31 | 32 | 'lifetime' => 120, 33 | 34 | 'expire_on_close' => false, 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Session Encryption 39 | |-------------------------------------------------------------------------- 40 | | 41 | | This option allows you to easily specify that all of your session data 42 | | should be encrypted before it is stored. All encryption will be run 43 | | automatically by Laravel and you can use the Session like normal. 44 | | 45 | */ 46 | 47 | 'encrypt' => false, 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Session File Location 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When using the native session driver, we need a location where session 55 | | files may be stored. A default has been set for you but a different 56 | | location may be specified. This is only needed for file sessions. 57 | | 58 | */ 59 | 60 | 'files' => storage_path().'/framework/sessions', 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Session Database Connection 65 | |-------------------------------------------------------------------------- 66 | | 67 | | When using the "database" or "redis" session drivers, you may specify a 68 | | connection that should be used to manage these sessions. This should 69 | | correspond to a connection in your database configuration options. 70 | | 71 | */ 72 | 73 | 'connection' => null, 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Session Database Table 78 | |-------------------------------------------------------------------------- 79 | | 80 | | When using the "database" session driver, you may specify the table we 81 | | should use to manage the sessions. Of course, a sensible default is 82 | | provided for you; however, you are free to change this as needed. 83 | | 84 | */ 85 | 86 | 'table' => 'sessions', 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Session Sweeping Lottery 91 | |-------------------------------------------------------------------------- 92 | | 93 | | Some session drivers must manually sweep their storage location to get 94 | | rid of old sessions from storage. Here are the chances that it will 95 | | happen on a given request. By default, the odds are 2 out of 100. 96 | | 97 | */ 98 | 99 | 'lottery' => [2, 100], 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Session Cookie Name 104 | |-------------------------------------------------------------------------- 105 | | 106 | | Here you may change the name of the cookie used to identify a session 107 | | instance by ID. The name specified here will get used every time a 108 | | new session cookie is created by the framework for every driver. 109 | | 110 | */ 111 | 112 | 'cookie' => 'laravel_session', 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Session Cookie Path 117 | |-------------------------------------------------------------------------- 118 | | 119 | | The session cookie path determines the path for which the cookie will 120 | | be regarded as available. Typically, this will be the root path of 121 | | your application but you are free to change this when necessary. 122 | | 123 | */ 124 | 125 | 'path' => '/', 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | Session Cookie Domain 130 | |-------------------------------------------------------------------------- 131 | | 132 | | Here you may change the domain of the cookie used to identify a session 133 | | in your application. This will determine which domains the cookie is 134 | | available to in your application. A sensible default has been set. 135 | | 136 | */ 137 | 138 | 'domain' => null, 139 | 140 | /* 141 | |-------------------------------------------------------------------------- 142 | | HTTPS Only Cookies 143 | |-------------------------------------------------------------------------- 144 | | 145 | | By setting this option to true, session cookies will only be sent back 146 | | to the server if the browser has a HTTPS connection. This will keep 147 | | the cookie from being sent to you if it can not be done securely. 148 | | 149 | */ 150 | 151 | 'secure' => false, 152 | 153 | ]; 154 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/views')) 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path().'/framework/views'), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/migrations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larask/gist/70d128ecea9f27de591eb8105394fd62bc97649c/database/migrations/.gitkeep -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | string('id',36)->index()->unique(); 18 | $table->primary('id'); 19 | $table->string('name'); 20 | $table->string('username', 20)->nullable()->default(null)->unique(); 21 | $table->string('email')->nullable()->default(null)->unique(); 22 | $table->string('password', 60); 23 | $table->rememberToken(); 24 | $table->timestamps(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::drop('users'); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token')->index(); 19 | $table->timestamp('created_at'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('password_resets'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2015_03_12_090406_create_gists_table.php: -------------------------------------------------------------------------------- 1 | string('id',36)->index()->unique(); 18 | $table->primary('id'); 19 | $table->string('user_id',36)->nullable()->index(); 20 | $table->string('title'); 21 | $table->binary('content'); 22 | $table->boolean('public'); 23 | $table->timestamps(); 24 | $table->softDeletes(); 25 | $table->foreign('user_id')->references('id')->on('users')->onDelete('SET NULL'); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::drop('gists'); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /database/seeds/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larask/gist/70d128ecea9f27de591eb8105394fd62bc97649c/database/seeds/.gitkeep -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UserTableSeeder::class); 25 | $this->call(GistTableSeeder::class); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /database/seeds/GistTableSeeder.php: -------------------------------------------------------------------------------- 1 | create('Gist\Gist'); 13 | } 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /database/seeds/UserTableSeeder.php: -------------------------------------------------------------------------------- 1 | create('Gist\User'); 12 | } 13 | } -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var elixir = require('laravel-elixir'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Elixir Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks 9 | | for your Laravel application. By default, we are compiling the Less 10 | | file for our application, as well as publishing vendor resources. 11 | | 12 | */ 13 | 14 | var path = { 15 | bower : 'bower_components/' 16 | }; 17 | 18 | elixir(function(mix) { 19 | mix.sass("app.scss",'public/css', {includePaths: ['./bower_components']} ) 20 | .copy( path.bower + 'bootstrap-sass/assets/fonts/**', 'public/fonts') 21 | .copy( path.bower + 'ace-builds/src-min/**', 'public/js/ace') 22 | .scripts([ 23 | "jquery/dist/jquery.js", 24 | "bootstrap-sass/assets/javascripts/bootstrap.js" 25 | ], "public/js/vendor.js", "bower_components") 26 | .scriptsIn("resources/js","public/js/script.js") 27 | .stylesIn("public/css") 28 | .version(["js/vendor.js", "js/script.js", "css/all.css"]); 29 | }); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "gulp": "^3.8.8", 4 | "laravel-elixir": "*" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /phpspec.yml: -------------------------------------------------------------------------------- 1 | suites: 2 | main: 3 | namespace: Gist 4 | psr4_prefix: Gist 5 | src_path: app -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | ./tests/ 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes... 9 | RewriteRule ^(.*)/$ /$1 [L,R=301] 10 | 11 | # Handle Front Controller... 12 | RewriteCond %{REQUEST_FILENAME} !-d 13 | RewriteCond %{REQUEST_FILENAME} !-f 14 | RewriteRule ^ index.php [L] 15 | 16 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larask/gist/70d128ecea9f27de591eb8105394fd62bc97649c/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | /* 10 | |-------------------------------------------------------------------------- 11 | | Register The Auto Loader 12 | |-------------------------------------------------------------------------- 13 | | 14 | | Composer provides a convenient, automatically generated class loader for 15 | | our application. We just need to utilize it! We'll simply require it 16 | | into the script here so that we don't have to worry about manual 17 | | loading any of our classes later on. It feels nice to relax. 18 | | 19 | */ 20 | 21 | require __DIR__.'/../bootstrap/autoload.php'; 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Turn On The Lights 26 | |-------------------------------------------------------------------------- 27 | | 28 | | We need to illuminate PHP development, so let us turn on the lights. 29 | | This bootstraps the framework and gets it ready for use, then it 30 | | will load up this application so that we can run it and send 31 | | the responses back to the browser and delight our users. 32 | | 33 | */ 34 | 35 | $app = require_once __DIR__.'/../bootstrap/app.php'; 36 | 37 | /* 38 | |-------------------------------------------------------------------------- 39 | | Run The Application 40 | |-------------------------------------------------------------------------- 41 | | 42 | | Once we have the application, we can simply call the run method, 43 | | which will execute the request and send the response back to 44 | | the client's browser allowing them to enjoy the creative 45 | | and wonderful application we have prepared for them. 46 | | 47 | */ 48 | 49 | $kernel = $app->make('Illuminate\Contracts\Http\Kernel'); 50 | 51 | $response = $kernel->handle( 52 | $request = Illuminate\Http\Request::capture() 53 | ); 54 | 55 | $response->send(); 56 | 57 | $kernel->terminate($request, $response); 58 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * Vendor styles 3 | */ 4 | @import "vendor/bootstrap"; 5 | @import "vendor/get-shit-done/get-shit-done"; 6 | 7 | /* 8 | * Application styles 9 | */ 10 | @import "app/layout"; 11 | @import "app/gist"; -------------------------------------------------------------------------------- /resources/assets/sass/app/gist.scss: -------------------------------------------------------------------------------- 1 | .snippet--input { 2 | min-height: 25em; 3 | width: 100%; 4 | } 5 | 6 | .snippet--display{ 7 | padding: 10px 0 5px 0; 8 | font-weight: bold; 9 | } -------------------------------------------------------------------------------- /resources/assets/sass/app/layout.scss: -------------------------------------------------------------------------------- 1 | .form-horizontal .checkbox { 2 | padding-top: 0; 3 | } 4 | 5 | .well { 6 | background-color: #fff; 7 | border-radius: 3px; 8 | border: 1px solid #d6d6d6; 9 | border-bottom-width: 2px; 10 | margin: 0 4px; 11 | position: relative; 12 | overflow: hidden; 13 | margin-bottom: 10px; 14 | } -------------------------------------------------------------------------------- /resources/assets/sass/vendor/bootstrap.scss: -------------------------------------------------------------------------------- 1 | $icon-font-path: '/fonts/bootstrap/'; 2 | @import "bootstrap-sass/assets/stylesheets/_bootstrap"; -------------------------------------------------------------------------------- /resources/assets/sass/vendor/get-shit-done/get-shit-done.scss: -------------------------------------------------------------------------------- 1 | @import "gsdk-base"; 2 | @import "gsdk-checkbox-radio-switch"; 3 | @import "gsdk-sliders"; 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /resources/assets/sass/vendor/get-shit-done/gsdk-checkbox-radio-switch.scss: -------------------------------------------------------------------------------- 1 | /* Checkbox and radio */ 2 | .checkbox, 3 | .radio { 4 | margin-bottom: 12px; 5 | padding-left: 32px; 6 | position: relative; 7 | -webkit-transition: color 0.25s linear; 8 | transition: color 0.25s linear; 9 | font-size: 14px; 10 | font-weight: normal; 11 | line-height: 1.5; 12 | color: #333333; 13 | } 14 | .checkbox input, 15 | .radio input { 16 | outline: none !important; 17 | display: none; 18 | } 19 | .checkbox .icons, 20 | .radio .icons { 21 | color: #D9D9D9; 22 | display: block; 23 | height: 20px; 24 | left: 0; 25 | position: absolute; 26 | top: 0; 27 | width: 20px; 28 | text-align: center; 29 | line-height: 21px; 30 | font-size: 20px; 31 | cursor: pointer; 32 | -webkit-transition: color 0.2s linear; 33 | transition: color 0.2s linear; 34 | } 35 | .checkbox .icons .first-icon, 36 | .radio .icons .first-icon, 37 | .checkbox .icons .second-icon, 38 | .radio .icons .second-icon { 39 | display: inline-table; 40 | position: absolute; 41 | left: 0; 42 | top: 0; 43 | background-color: transparent; 44 | margin: 0; 45 | opacity: 1; 46 | filter: alpha(opacity=100); 47 | } 48 | .checkbox .icons .second-icon, 49 | .radio .icons .second-icon { 50 | opacity: 0; 51 | filter: alpha(opacity=0); 52 | } 53 | .checkbox:hover, 54 | .radio:hover { 55 | -webkit-transition: color 0.2s linear; 56 | transition: color 0.2s linear; 57 | } 58 | .checkbox:hover .first-icon, 59 | .radio:hover .first-icon { 60 | opacity: 0; 61 | filter: alpha(opacity=0); 62 | } 63 | .checkbox:hover .second-icon, 64 | .radio:hover .second-icon { 65 | opacity: 1; 66 | filter: alpha(opacity=100); 67 | } 68 | .checkbox.checked, 69 | .radio.checked { 70 | color: #2C93FF; 71 | } 72 | .checkbox.checked .first-icon, 73 | .radio.checked .first-icon { 74 | opacity: 0; 75 | filter: alpha(opacity=0); 76 | } 77 | .checkbox.checked .second-icon, 78 | .radio.checked .second-icon { 79 | opacity: 1; 80 | filter: alpha(opacity=100); 81 | color: #2C93FF; 82 | -webkit-transition: color 0.2s linear; 83 | transition: color 0.2s linear; 84 | } 85 | .checkbox.disabled, 86 | .radio.disabled { 87 | cursor: default; 88 | color: #D9D9D9 !important; 89 | } 90 | .checkbox.disabled .icons, 91 | .radio.disabled .icons { 92 | color: #D9D9D9 !important; 93 | } 94 | .checkbox.disabled .first-icon, 95 | .radio.disabled .first-icon { 96 | opacity: 1; 97 | filter: alpha(opacity=100); 98 | } 99 | .checkbox.disabled .second-icon, 100 | .radio.disabled .second-icon { 101 | opacity: 0; 102 | filter: alpha(opacity=0); 103 | } 104 | .checkbox.disabled.checked .icons, 105 | .radio.disabled.checked .icons { 106 | color: #D9D9D9; 107 | } 108 | .checkbox.disabled.checked .first-icon, 109 | .radio.disabled.checked .first-icon { 110 | opacity: 0; 111 | filter: alpha(opacity=0); 112 | } 113 | .checkbox.disabled.checked .second-icon, 114 | .radio.disabled.checked .second-icon { 115 | opacity: 1; 116 | filter: alpha(opacity=100); 117 | color: #D9D9D9; 118 | } 119 | 120 | /* ============================================================ 121 | * bootstrapSwitch v1.3 by Larentis Mattia @spiritualGuru 122 | * http://www.larentis.eu/switch/ 123 | * ============================================================ 124 | * Licensed under the Apache License, Version 2.0 125 | * http://www.apache.org/licenses/LICENSE-2.0 126 | * ============================================================ */ 127 | .has-switch { 128 | border-radius: 30px; 129 | cursor: pointer; 130 | display: inline-block; 131 | line-height: 1.72222; 132 | overflow: hidden; 133 | position: relative; 134 | text-align: left; 135 | width: 60px; 136 | 137 | -webkit-user-select: none; 138 | -moz-user-select: none; 139 | -ms-user-select: none; 140 | -o-user-select: none; 141 | user-select: none; 142 | 143 | /* this code is for fixing safari bug with hidden overflow for border-radius */ 144 | -webkit-mask: url('../img/mask.png') 0 0 no-repeat; 145 | -webkit-mask-size: 60px 24px; 146 | mask: url('../img/mask.png') 0 0 no-repeat; 147 | background: #fad73f; /* Old browsers */ 148 | background: -webkit-gradient(radial, center center, 0, center center, 100%, color-stop(0,#fad73f), color(48px,#fad73f), color-stop(49px,#821067)); /* Chrome,Safari4+ */ 149 | background: -webkit-radial-gradient(center, ellipse cover, #fad73f 0,#fad73f 48px,#821067 49px); /* Chrome10+,Safari5.1+ */ 150 | 151 | } 152 | .has-switch.deactivate { 153 | opacity: 0.5; 154 | filter: alpha(opacity=50); 155 | cursor: default !important; 156 | } 157 | .has-switch.deactivate label, 158 | .has-switch.deactivate span { 159 | cursor: default !important; 160 | } 161 | .has-switch > div { 162 | position: relative; 163 | top: 0; 164 | width: 100px; 165 | } 166 | .has-switch > div.switch-animate { 167 | -webkit-transition: left 0.25s ease-out; 168 | transition: left 0.25s ease-out; 169 | } 170 | .has-switch > div.switch-off { 171 | left: -35px; 172 | } 173 | 174 | .has-switch > div.switch-on { 175 | left: 0; 176 | } 177 | .has-switch > div label { 178 | background-color: #FFFFFF; 179 | background: rgb(255,255,255); /* Old browsers */ 180 | background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(241,241,242,1) 100%); /* FF3.6+ */ 181 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(241,241,242,1))); /* Chrome,Safari4+ */ 182 | background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,242,1) 100%); /* Chrome10+,Safari5.1+ */ 183 | background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,242,1) 100%); /* Opera 11.10+ */ 184 | background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,242,1) 100%); /* IE10+ */ 185 | background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(241,241,242,1) 100%); /* W3C */ 186 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f1f1f2',GradientType=0 ); /* IE6-9 */ 187 | box-shadow: 0 1px 1px #FFFFFF inset, 0 1px 1px rgba(0, 0, 0, 0.25); 188 | cursor: pointer; 189 | } 190 | .has-switch input[type=checkbox] { 191 | display: none; 192 | } 193 | .has-switch span { 194 | /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) inset; */ 195 | cursor: pointer; 196 | float: left; 197 | font-size: 11px; 198 | font-weight: 400; 199 | height: 24px; 200 | line-height: 15px; 201 | margin: 0; 202 | padding-bottom: 6px; 203 | padding-top: 5px; 204 | position: relative; 205 | text-align: center; 206 | text-indent: -10px; 207 | width: 50%; 208 | z-index: 1; 209 | -webkit-transition: 0.25s ease-out; 210 | transition: 0.25s ease-out; 211 | } 212 | .has-switch span.switch-left { 213 | background-color: #2C93FF; 214 | border-left: 1px solid rgba(0, 0, 0, 0); 215 | border-radius: 30px 0 0 30px; 216 | color: #FFFFFF; 217 | } 218 | .has-switch .switch-off span.switch-left{ 219 | background-color: #D9D9D9; 220 | } 221 | .has-switch span.switch-right { 222 | border-radius: 0 30px 30px 0; 223 | background-color: #2C93FF; 224 | color: #ffffff; 225 | text-indent: 1px; 226 | } 227 | .has-switch .switch-off span.switch-right{ 228 | background-color: #D9D9D9; 229 | } 230 | .has-switch span.switch-right [class*="fui-"] { 231 | text-indent: 0; 232 | } 233 | .has-switch label { 234 | border-radius: 12px; 235 | float: left; 236 | height: 22px; 237 | margin: 1px -13px; 238 | padding: 0; 239 | position: relative; 240 | transition: all 0.25s ease-out 0s; 241 | vertical-align: middle; 242 | width: 22px; 243 | z-index: 100; 244 | -webkit-transition: 0.25s ease-out; 245 | transition: 0.25s ease-out; 246 | } 247 | .has-switch .switch-on .fa-check:before{ 248 | margin-left: 10px; 249 | } 250 | .has-switch:hover .switch-on label{ 251 | margin: 1px -17px; 252 | width: 26px; 253 | } 254 | .has-switch:hover .switch-off label{ 255 | margin: 1px -13px; 256 | width: 26px; 257 | } 258 | -------------------------------------------------------------------------------- /resources/assets/sass/vendor/get-shit-done/gsdk-sliders.scss: -------------------------------------------------------------------------------- 1 | 2 | /*! 3 | * jQuery UI Slider 1.10.4 4 | * http://jqueryui.com 5 | * 6 | * Copyright 2014 jQuery Foundation and other contributors 7 | * Released under the MIT license. 8 | * http://jquery.org/license 9 | * 10 | * http://api.jqueryui.com/slider/#theming 11 | */ 12 | .ui-slider { 13 | position: relative; 14 | text-align: left; 15 | } 16 | .ui-slider .ui-slider-handle { 17 | position: absolute; 18 | z-index: 2; 19 | width: 1.2em; 20 | height: 1.2em; 21 | cursor: default; 22 | } 23 | .ui-slider .ui-slider-range { 24 | position: absolute; 25 | z-index: 1; 26 | font-size: .7em; 27 | display: block; 28 | border: 0; 29 | background-position: 0 0; 30 | } 31 | 32 | /* For IE8 - See #6727 */ 33 | .ui-slider.ui-state-disabled .ui-slider-handle, 34 | .ui-slider.ui-state-disabled .ui-slider-range { 35 | filter: inherit; 36 | } 37 | 38 | .ui-slider-horizontal { 39 | height: 4px; 40 | } 41 | .ui-slider-horizontal .ui-slider-handle { 42 | margin-left: -10px; 43 | top: -7px; 44 | } 45 | .ui-slider-horizontal .ui-slider-range { 46 | top: 0; 47 | height: 100%; 48 | } 49 | .ui-slider-horizontal .ui-slider-range-min { 50 | left: 0; 51 | } 52 | .ui-slider-horizontal .ui-slider-range-max { 53 | right: 0; 54 | } 55 | 56 | .ui-slider-vertical { 57 | width: .8em; 58 | height: 100px; 59 | } 60 | .ui-slider-vertical .ui-slider-handle { 61 | left: -.3em; 62 | margin-left: 0; 63 | margin-bottom: -.6em; 64 | } 65 | .ui-slider-vertical .ui-slider-range { 66 | left: 0; 67 | width: 100%; 68 | } 69 | .ui-slider-vertical .ui-slider-range-min { 70 | bottom: 0; 71 | } 72 | .ui-slider-vertical .ui-slider-range-max { 73 | top: 0; 74 | } 75 | 76 | /* Component containers 77 | ----------------------------------*/ 78 | .ui-widget { 79 | font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; 80 | font-size: 1.1em/*{fsDefault}*/; 81 | } 82 | .ui-widget .ui-widget { 83 | font-size: 1em; 84 | } 85 | .ui-widget input, 86 | .ui-widget select, 87 | .ui-widget textarea, 88 | .ui-widget button { 89 | font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; 90 | font-size: 1em; 91 | } 92 | .ui-widget-content { 93 | background-color: #E5E5E5; 94 | } 95 | .ui-widget-content a { 96 | color: #222222/*{fcContent}*/; 97 | } 98 | .ui-widget-header { 99 | background: #999999; 100 | color: #222222; 101 | font-weight: bold; 102 | } 103 | .ui-widget-header a { 104 | color: #222222; 105 | } 106 | 107 | .slider-primary .ui-widget-header{ 108 | background-color: #3472F7; 109 | } 110 | .slider-info .ui-widget-header{ 111 | background-color: #2C93FF; 112 | } 113 | .slider-success .ui-widget-header{ 114 | background-color: #05AE0E; 115 | } 116 | .slider-warning .ui-widget-header{ 117 | background-color: #FF9500; 118 | } 119 | .slider-danger .ui-widget-header{ 120 | background-color: #FF3B30; 121 | } 122 | 123 | /* Interaction states 124 | ----------------------------------*/ 125 | .ui-state-default, 126 | .ui-widget-content .ui-state-default, 127 | .ui-widget-header .ui-state-default { 128 | background: rgb(255,255,255); /* Old browsers */ 129 | background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(241,241,242,1) 100%); /* FF3.6+ */ 130 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(241,241,242,1))); /* Chrome,Safari4+ */ 131 | background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,242,1) 100%); /* Chrome10+,Safari5.1+ */ 132 | background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,242,1) 100%); /* Opera 11.10+ */ 133 | background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,242,1) 100%); /* IE10+ */ 134 | background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(241,241,242,1) 100%); /* W3C */ 135 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f1f1f2',GradientType=0 ); /* IE6-9 */ 136 | 137 | border-radius: 50%; 138 | box-shadow: 0 1px 1px #FFFFFF inset, 0 1px 2px rgba(0, 0, 0, 0.4); 139 | height:15px; 140 | width:15px; 141 | cursor:pointer; 142 | } 143 | .ui-state-default a, 144 | .ui-state-default a:link, 145 | .ui-state-default a:visited { 146 | color: #555555/*{fcDefault}*/; 147 | text-decoration: none; 148 | } 149 | 150 | .ui-state-hover a, 151 | .ui-state-hover a:hover, 152 | .ui-state-hover a:link, 153 | .ui-state-hover a:visited, 154 | .ui-state-focus a, 155 | .ui-state-focus a:hover, 156 | .ui-state-focus a:link, 157 | .ui-state-focus a:visited { 158 | color: #212121/*{fcHover}*/; 159 | text-decoration: none; 160 | } 161 | .ui-state-active a, 162 | .ui-state-active a:link, 163 | .ui-state-active a:visited { 164 | color: #212121/*{fcActive}*/; 165 | text-decoration: none; 166 | } 167 | 168 | /* Interaction Cues 169 | ----------------------------------*/ 170 | .ui-state-highlight, 171 | .ui-widget-content .ui-state-highlight, 172 | .ui-widget-header .ui-state-highlight { 173 | border: 1px solid #fcefa1; 174 | background: #fbf9ee; 175 | color: #363636; 176 | } 177 | .ui-state-highlight a, 178 | .ui-widget-content .ui-state-highlight a, 179 | .ui-widget-header .ui-state-highlight a { 180 | color: #363636; 181 | } 182 | .ui-state-error, 183 | .ui-widget-content .ui-state-error, 184 | .ui-widget-header .ui-state-error { 185 | border: 1px solid #cd0a0a/*{borderColorError}*/; 186 | background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; 187 | color: #cd0a0a/*{fcError}*/; 188 | } 189 | .ui-state-error a, 190 | .ui-widget-content .ui-state-error a, 191 | .ui-widget-header .ui-state-error a { 192 | color: #cd0a0a/*{fcError}*/; 193 | } 194 | .ui-state-error-text, 195 | .ui-widget-content .ui-state-error-text, 196 | .ui-widget-header .ui-state-error-text { 197 | color: #cd0a0a/*{fcError}*/; 198 | } 199 | .ui-priority-primary, 200 | .ui-widget-content .ui-priority-primary, 201 | .ui-widget-header .ui-priority-primary { 202 | font-weight: bold; 203 | } 204 | .ui-priority-secondary, 205 | .ui-widget-content .ui-priority-secondary, 206 | .ui-widget-header .ui-priority-secondary { 207 | opacity: .7; 208 | filter:Alpha(Opacity=70); 209 | font-weight: normal; 210 | } 211 | .ui-state-disabled, 212 | .ui-widget-content .ui-state-disabled, 213 | .ui-widget-header .ui-state-disabled { 214 | opacity: .35; 215 | filter:Alpha(Opacity=35); 216 | background-image: none; 217 | } 218 | .ui-state-disabled .ui-icon { 219 | filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ 220 | } -------------------------------------------------------------------------------- /resources/images/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larask/gist/70d128ecea9f27de591eb8105394fd62bc97649c/resources/images/.gitkeep -------------------------------------------------------------------------------- /resources/js/get-shit-done/get-shit-done.js: -------------------------------------------------------------------------------- 1 | searchVisible = 0; 2 | transparent = true; 3 | $(document).ready(function(){ 4 | /* Activate the switches with icons */ 5 | //$('.switch')['bootstrapSwitch'](); 6 | 7 | /* Activate regular switches */ 8 | //$("[data-toggle='switch']").wrap('
').parent().bootstrapSwitch(); 9 | 10 | $('[data-toggle="search"]').click(function(){ 11 | if(searchVisible == 0){ 12 | searchVisible = 1; 13 | $(this).parent().addClass('active'); 14 | $('.navbar-search-form').fadeIn(function(){ 15 | $('.navbar-search-form input').focus(); 16 | }); 17 | } else { 18 | searchVisible = 0; 19 | $(this).parent().removeClass('active'); 20 | $(this).blur(); 21 | $('.navbar-search-form').fadeOut(function(){ 22 | $('.navbar-search-form input').blur(); 23 | }); 24 | } 25 | }); 26 | 27 | $('[data-toggle="gsdk-collapse"]').hover( 28 | function(){ 29 | console.log('on hover'); 30 | var thisdiv = $(this).attr("data-target"); 31 | 32 | if(!$(this).hasClass('state-open')){ 33 | $(this).addClass('state-hover'); 34 | $(thisdiv).css({ 35 | 'height':'30px' 36 | }); 37 | } 38 | 39 | }, 40 | function(){ 41 | var thisdiv = $(this).attr("data-target"); 42 | $(this).removeClass('state-hover'); 43 | 44 | if(!$(this).hasClass('state-open')){ 45 | $(thisdiv).css({ 46 | 'height':'0px' 47 | }); 48 | } 49 | } 50 | ); 51 | 52 | $('[data-toggle="gsdk-collapse"]').click( 53 | function(event){ 54 | event.preventDefault(); 55 | 56 | var thisdiv = $(this).attr("data-target"); 57 | var height = $(thisdiv).children('.panel-body').height(); 58 | 59 | if($(this).hasClass('state-open')){ 60 | $(thisdiv).css({ 61 | 'height':'0px', 62 | }); 63 | $(this).removeClass('state-open'); 64 | } else { 65 | $(thisdiv).css({ 66 | 'height':height, 67 | }); 68 | $(this).addClass('state-open'); 69 | } 70 | } 71 | ); 72 | }); 73 | 74 | $(function () { 75 | $('[data-toggle="gsdk-collapse"]').each(function () { 76 | var thisdiv = $(this).attr("data-target"); 77 | $(thisdiv).addClass("gsdk-collapse"); 78 | }); 79 | 80 | }); 81 | 82 | $(document).scroll(function() { 83 | if( $(this).scrollTop() > 260 ) { 84 | if(transparent) { 85 | transparent = false; 86 | $('nav[role="navigation"]').removeClass('navbar-transparent'); 87 | } 88 | } else { 89 | if( !transparent ) { 90 | transparent = true; 91 | $('nav[role="navigation"]').addClass('navbar-transparent'); 92 | } 93 | } 94 | }); 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /resources/js/get-shit-done/gsdk-checkbox.js: -------------------------------------------------------------------------------- 1 | !function ($) { 2 | 3 | /* CHECKBOX PUBLIC CLASS DEFINITION 4 | * ============================== */ 5 | 6 | var Checkbox = function (element, options) { 7 | this.init(element, options); 8 | } 9 | 10 | Checkbox.prototype = { 11 | 12 | constructor: Checkbox 13 | 14 | , init: function (element, options) { 15 | var $el = this.$element = $(element) 16 | 17 | this.options = $.extend({}, $.fn.checkbox.defaults, options); 18 | $el.before(this.options.template); 19 | this.setState(); 20 | } 21 | 22 | , setState: function () { 23 | var $el = this.$element 24 | , $parent = $el.closest('.checkbox'); 25 | 26 | $el.prop('disabled') && $parent.addClass('disabled'); 27 | $el.prop('checked') && $parent.addClass('checked'); 28 | } 29 | 30 | , toggle: function () { 31 | var ch = 'checked' 32 | , $el = this.$element 33 | , $parent = $el.closest('.checkbox') 34 | , checked = $el.prop(ch) 35 | , e = $.Event('toggle') 36 | 37 | if ($el.prop('disabled') == false) { 38 | $parent.toggleClass(ch) && checked ? $el.removeAttr(ch) : $el.prop(ch, ch); 39 | $el.trigger(e).trigger('change'); 40 | } 41 | } 42 | 43 | , setCheck: function (option) { 44 | var d = 'disabled' 45 | , ch = 'checked' 46 | , $el = this.$element 47 | , $parent = $el.closest('.checkbox') 48 | , checkAction = option == 'check' ? true : false 49 | , e = $.Event(option) 50 | 51 | $parent[checkAction ? 'addClass' : 'removeClass' ](ch) && checkAction ? $el.prop(ch, ch) : $el.removeAttr(ch); 52 | $el.trigger(e).trigger('change'); 53 | } 54 | 55 | } 56 | 57 | 58 | /* CHECKBOX PLUGIN DEFINITION 59 | * ======================== */ 60 | 61 | var old = $.fn.checkbox 62 | 63 | $.fn.checkbox = function (option) { 64 | return this.each(function () { 65 | var $this = $(this) 66 | , data = $this.data('checkbox') 67 | , options = $.extend({}, $.fn.checkbox.defaults, $this.data(), typeof option == 'object' && option); 68 | if (!data) $this.data('checkbox', (data = new Checkbox(this, options))); 69 | if (option == 'toggle') data.toggle() 70 | if (option == 'check' || option == 'uncheck') data.setCheck(option) 71 | else if (option) data.setState(); 72 | }); 73 | } 74 | 75 | $.fn.checkbox.defaults = { 76 | template: '' 77 | } 78 | 79 | 80 | /* CHECKBOX NO CONFLICT 81 | * ================== */ 82 | 83 | $.fn.checkbox.noConflict = function () { 84 | $.fn.checkbox = old; 85 | return this; 86 | } 87 | 88 | 89 | /* CHECKBOX DATA-API 90 | * =============== */ 91 | 92 | $(document).on('click.checkbox.data-api', '[data-toggle^=checkbox], .checkbox', function (e) { 93 | var $checkbox = $(e.target); 94 | if (e.target.tagName != "A") { 95 | e && e.preventDefault() && e.stopPropagation(); 96 | if (!$checkbox.hasClass('checkbox')) $checkbox = $checkbox.closest('.checkbox'); 97 | $checkbox.find(':checkbox').checkbox('toggle'); 98 | } 99 | }); 100 | 101 | $(function () { 102 | $('[data-toggle="checkbox"]').each(function () { 103 | var $checkbox = $(this); 104 | $checkbox.checkbox(); 105 | }); 106 | }); 107 | 108 | }(window.jQuery); 109 | 110 | -------------------------------------------------------------------------------- /resources/js/get-shit-done/gsdk-radio.js: -------------------------------------------------------------------------------- 1 | /* ============================================================= 2 | * flatui-radio v0.0.3 3 | * ============================================================ */ 4 | 5 | !function ($) { 6 | 7 | /* RADIO PUBLIC CLASS DEFINITION 8 | * ============================== */ 9 | 10 | var Radio = function (element, options) { 11 | this.init(element, options); 12 | } 13 | 14 | Radio.prototype = { 15 | 16 | constructor: Radio 17 | 18 | , init: function (element, options) { 19 | var $el = this.$element = $(element) 20 | 21 | this.options = $.extend({}, $.fn.radio.defaults, options); 22 | $el.before(this.options.template); 23 | this.setState(); 24 | } 25 | 26 | , setState: function () { 27 | var $el = this.$element 28 | , $parent = $el.closest('.radio'); 29 | 30 | $el.prop('disabled') && $parent.addClass('disabled'); 31 | $el.prop('checked') && $parent.addClass('checked'); 32 | } 33 | 34 | , toggle: function () { 35 | var d = 'disabled' 36 | , ch = 'checked' 37 | , $el = this.$element 38 | , checked = $el.prop(ch) 39 | , $parent = $el.closest('.radio') 40 | , $parentWrap = $el.closest('form').length ? $el.closest('form') : $el.closest('body') 41 | , $elemGroup = $parentWrap.find(':radio[name="' + $el.attr('name') + '"]') 42 | , e = $.Event('toggle') 43 | 44 | $elemGroup.not($el).each(function () { 45 | var $el = $(this) 46 | , $parent = $(this).closest('.radio'); 47 | 48 | if ($el.prop(d) == false) { 49 | $parent.removeClass(ch) && $el.removeAttr(ch).trigger('change'); 50 | } 51 | }); 52 | 53 | if ($el.prop(d) == false) { 54 | if (checked == false) $parent.addClass(ch) && $el.prop(ch, true); 55 | $el.trigger(e); 56 | 57 | if (checked !== $el.prop(ch)) { 58 | $el.trigger('change'); 59 | } 60 | } 61 | } 62 | 63 | , setCheck: function (option) { 64 | var ch = 'checked' 65 | , $el = this.$element 66 | , $parent = $el.closest('.radio') 67 | , checkAction = option == 'check' ? true : false 68 | , checked = $el.prop(ch) 69 | , $parentWrap = $el.closest('form').length ? $el.closest('form') : $el.closest('body') 70 | , $elemGroup = $parentWrap.find(':radio[name="' + $el['attr']('name') + '"]') 71 | , e = $.Event(option) 72 | 73 | $elemGroup.not($el).each(function () { 74 | var $el = $(this) 75 | , $parent = $(this).closest('.radio'); 76 | 77 | $parent.removeClass(ch) && $el.removeAttr(ch); 78 | }); 79 | 80 | $parent[checkAction ? 'addClass' : 'removeClass'](ch) && checkAction ? $el.prop(ch, ch) : $el.removeAttr(ch); 81 | $el.trigger(e); 82 | 83 | if (checked !== $el.prop(ch)) { 84 | $el.trigger('change'); 85 | } 86 | } 87 | 88 | } 89 | 90 | 91 | /* RADIO PLUGIN DEFINITION 92 | * ======================== */ 93 | 94 | var old = $.fn.radio 95 | 96 | $.fn.radio = function (option) { 97 | return this.each(function () { 98 | var $this = $(this) 99 | , data = $this.data('radio') 100 | , options = $.extend({}, $.fn.radio.defaults, $this.data(), typeof option == 'object' && option); 101 | if (!data) $this.data('radio', (data = new Radio(this, options))); 102 | if (option == 'toggle') data.toggle() 103 | if (option == 'check' || option == 'uncheck') data.setCheck(option) 104 | else if (option) data.setState(); 105 | }); 106 | } 107 | 108 | $.fn.radio.defaults = { 109 | template: '' 110 | } 111 | 112 | 113 | /* RADIO NO CONFLICT 114 | * ================== */ 115 | 116 | $.fn.radio.noConflict = function () { 117 | $.fn.radio = old; 118 | return this; 119 | } 120 | 121 | 122 | /* RADIO DATA-API 123 | * =============== */ 124 | 125 | $(document).on('click.radio.data-api', '[data-toggle^=radio], .radio', function (e) { 126 | var $radio = $(e.target); 127 | e && e.preventDefault() && e.stopPropagation(); 128 | if (!$radio.hasClass('radio')) $radio = $radio.closest('.radio'); 129 | $radio.find(':radio').radio('toggle'); 130 | }); 131 | 132 | $(function () { 133 | $('[data-toggle="radio"]').each(function () { 134 | var $radio = $(this); 135 | $radio.radio(); 136 | }); 137 | }); 138 | 139 | }(window.jQuery); 140 | 141 | -------------------------------------------------------------------------------- /resources/js/get-shit-done/jquery-ui-1.10.4.custom.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.10.4 - 2014-04-14 2 | * http://jqueryui.com 3 | * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.slider.js 4 | * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ 5 | 6 | (function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("
").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()/2,top:e.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery); -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | "Passwords must be at least six characters and match the confirmation.", 17 | "user" => "We can't find a user with that e-mail address.", 18 | "token" => "This password reset token is invalid.", 19 | "sent" => "We have e-mailed your password reset link!", 20 | "reset" => "Your password has been reset!", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /resources/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | "The :attribute must be accepted.", 17 | "active_url" => "The :attribute is not a valid URL.", 18 | "after" => "The :attribute must be a date after :date.", 19 | "alpha" => "The :attribute may only contain letters.", 20 | "alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.", 21 | "alpha_num" => "The :attribute may only contain letters and numbers.", 22 | "array" => "The :attribute must be an array.", 23 | "before" => "The :attribute must be a date before :date.", 24 | "between" => [ 25 | "numeric" => "The :attribute must be between :min and :max.", 26 | "file" => "The :attribute must be between :min and :max kilobytes.", 27 | "string" => "The :attribute must be between :min and :max characters.", 28 | "array" => "The :attribute must have between :min and :max items.", 29 | ], 30 | "boolean" => "The :attribute field must be true or false.", 31 | "confirmed" => "The :attribute confirmation does not match.", 32 | "date" => "The :attribute is not a valid date.", 33 | "date_format" => "The :attribute does not match the format :format.", 34 | "different" => "The :attribute and :other must be different.", 35 | "digits" => "The :attribute must be :digits digits.", 36 | "digits_between" => "The :attribute must be between :min and :max digits.", 37 | "email" => "The :attribute must be a valid email address.", 38 | "filled" => "The :attribute field is required.", 39 | "exists" => "The selected :attribute is invalid.", 40 | "image" => "The :attribute must be an image.", 41 | "in" => "The selected :attribute is invalid.", 42 | "integer" => "The :attribute must be an integer.", 43 | "ip" => "The :attribute must be a valid IP address.", 44 | "max" => [ 45 | "numeric" => "The :attribute may not be greater than :max.", 46 | "file" => "The :attribute may not be greater than :max kilobytes.", 47 | "string" => "The :attribute may not be greater than :max characters.", 48 | "array" => "The :attribute may not have more than :max items.", 49 | ], 50 | "mimes" => "The :attribute must be a file of type: :values.", 51 | "min" => [ 52 | "numeric" => "The :attribute must be at least :min.", 53 | "file" => "The :attribute must be at least :min kilobytes.", 54 | "string" => "The :attribute must be at least :min characters.", 55 | "array" => "The :attribute must have at least :min items.", 56 | ], 57 | "not_in" => "The selected :attribute is invalid.", 58 | "numeric" => "The :attribute must be a number.", 59 | "regex" => "The :attribute format is invalid.", 60 | "required" => "The :attribute field is required.", 61 | "required_if" => "The :attribute field is required when :other is :value.", 62 | "required_with" => "The :attribute field is required when :values is present.", 63 | "required_with_all" => "The :attribute field is required when :values is present.", 64 | "required_without" => "The :attribute field is required when :values is not present.", 65 | "required_without_all" => "The :attribute field is required when none of :values are present.", 66 | "same" => "The :attribute and :other must match.", 67 | "size" => [ 68 | "numeric" => "The :attribute must be :size.", 69 | "file" => "The :attribute must be :size kilobytes.", 70 | "string" => "The :attribute must be :size characters.", 71 | "array" => "The :attribute must contain :size items.", 72 | ], 73 | "unique" => "The :attribute has already been taken.", 74 | "url" => "The :attribute format is invalid.", 75 | "timezone" => "The :attribute must be a valid zone.", 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Custom Validation Language Lines 80 | |-------------------------------------------------------------------------- 81 | | 82 | | Here you may specify custom validation messages for attributes using the 83 | | convention "attribute.rule" to name the lines. This makes it quick to 84 | | specify a specific custom language line for a given attribute rule. 85 | | 86 | */ 87 | 88 | 'custom' => [ 89 | 'attribute-name' => [ 90 | 'rule-name' => 'custom-message', 91 | ], 92 | ], 93 | 94 | /* 95 | |-------------------------------------------------------------------------- 96 | | Custom Validation Attributes 97 | |-------------------------------------------------------------------------- 98 | | 99 | | The following language lines are used to swap attribute place-holders 100 | | with something more reader friendly such as E-Mail Address instead 101 | | of "email". This simply helps us make messages a little cleaner. 102 | | 103 | */ 104 | 105 | 'attributes' => [], 106 | 107 | ]; 108 | -------------------------------------------------------------------------------- /resources/views/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | @yield('title', 'Larask Gist') 8 | 9 | 10 | 11 | 12 | 13 | 17 | @yield('header') 18 | 19 | 20 | 62 | 63 | @yield('content') 64 | 65 |
66 |
67 |

Copyright @larask.

68 |
69 |
70 | 71 | 72 | 73 | @yield('footer') 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /resources/views/app/_partials/_gist-list.blade.php: -------------------------------------------------------------------------------- 1 | @unless(count($gists)) 2 |
3 |

Không tìm thấy kết quả nào

4 |
5 | @endunless 6 | 7 | @foreach($gists as $gist) 8 |
9 |
10 | 15 | 16 |
17 | show stat here 18 |
19 |
20 | 21 |
22 |
23 |
{{ $gist->content }}
24 |
25 |
26 | 27 |
28 | @endforeach 29 | 32 | -------------------------------------------------------------------------------- /resources/views/app/_partials/_sidebar-search.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Search

4 |
5 | 6 | 7 | 10 | 11 |
12 | 13 |
-------------------------------------------------------------------------------- /resources/views/app/_partials/_sidebar-tags.blade.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Tags

4 |
5 |
6 | 16 |
17 |
18 | 28 |
29 |
30 | 31 |
-------------------------------------------------------------------------------- /resources/views/app/_partials/_sidebar-user-profile.blade.php: -------------------------------------------------------------------------------- 1 |
2 | 3 |

{{ '@'. $user->username }}

4 |
{{ $user->name }}
5 |
-------------------------------------------------------------------------------- /resources/views/app/gists/gist-create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 | @if (count($errors) > 0) 8 |
9 | Whoops! There were some problems with your input.

10 |
    11 | @foreach ($errors->all() as $error) 12 |
  • {{ $error }}
  • 13 | @endforeach 14 |
15 |
16 | @endif 17 | 18 | {!! Form::open([ 19 | 'route' => 'gist.store', 20 | 'method' => 'post', 21 | 'class' => 'form-vertical', 22 | 'id' => 'gist' 23 | ]) 24 | !!} 25 |
26 | 27 | Tạo Gists mới 28 | 29 | 30 |
31 | {!! Form::label('title','Mô tả', ['class' => 'col-md-2 control-label'] ) !!} 32 |
33 | {!! Form::text('title','', [ 34 | 'placeholder' => 'mô tả ngắn cho snippet của bạn...', 35 | 'class' => 'form-control input-md', 36 | ]) 37 | !!} 38 |
39 |
40 | 41 | 42 |
43 | {!! Form::label('content','Snippet',['class' => 'col-md-2 control-label'] ) !!} 44 |
45 |
nhập bất cứ thứ gì vào đây
46 |
47 |
48 |
49 |
50 | {!! Form::submit('Tạo snippet công khai',[ 51 | 'class' => 'btn btn-primary', 52 | 'id' => 'btn-public', 53 | 'data-loading' => 'Processing...', 54 | 'data-public' => true 55 | ]) 56 | !!} 57 | 58 | {!! Form::submit('Tạo snippet bí mật',[ 59 | 'class' => 'btn btn-success', 60 | 'id' => 'btn-private', 61 | 'data-loading' => 'Processing...', 62 | 'data-public' => false 63 | ]) 64 | !!} 65 |
66 |
67 |
68 | {!! Form::close() !!} 69 |
70 | 71 |
72 | 73 |
74 | 75 | @endsection 76 | 77 | @section('footer') 78 | 79 | 139 | @endsection 140 | -------------------------------------------------------------------------------- /resources/views/app/gists/gist-index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('title') 4 | All Gists 5 | @endsection 6 | 7 | @section('content') 8 |
9 |
10 | 11 | 12 |
13 | @include('app._partials._gist-list') 14 |
15 | 16 | 17 |
18 | @include('app._partials._sidebar-search') 19 | @include('app._partials._sidebar-tags') 20 |
21 | 22 |
23 | 24 |
25 | 26 | @endsection 27 | -------------------------------------------------------------------------------- /resources/views/app/gists/gist-show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 | 9 | 14 | {!! Form::close() !!} 15 |
16 | 17 |
18 | 19 |
20 | 21 |
22 | 23 | @endsection 24 | -------------------------------------------------------------------------------- /resources/views/app/users/user-show.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('title') 4 | {{ $user->username }}'s snippets 5 | @endsection 6 | 7 | @section('content') 8 |
9 |
10 | 11 | 12 |
13 | @include('app._partials._gist-list') 14 |
15 | 16 | 17 |
18 | @include('app._partials._sidebar-user-profile') 19 | @include('app._partials._sidebar-search') 20 | @include('app._partials._sidebar-tags') 21 |
22 | 23 |
24 | 25 |
26 | 27 | @endsection 28 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Login
9 |
10 | @if (count($errors) > 0) 11 |
12 | Whoops! There were some problems with your input.

13 |
    14 | @foreach ($errors->all() as $error) 15 |
  • {{ $error }}
  • 16 | @endforeach 17 |
18 |
19 | @endif 20 | 21 |
22 | 23 | 24 |
25 | 26 |
27 | 28 |
29 |
30 | 31 |
32 | 33 |
34 | 35 |
36 |
37 | 38 |
39 |
40 | 44 |
45 |
46 | 47 |
48 |
49 | 52 | 53 | Forgot Your Password? 54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | @endsection 63 | -------------------------------------------------------------------------------- /resources/views/auth/password.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 |
10 | @if (session('status')) 11 |
12 | {{ session('status') }} 13 |
14 | @endif 15 | 16 | @if (count($errors) > 0) 17 |
18 | Whoops! There were some problems with your input.

19 |
    20 | @foreach ($errors->all() as $error) 21 |
  • {{ $error }}
  • 22 | @endforeach 23 |
24 |
25 | @endif 26 | 27 |
28 | 29 | 30 |
31 | 32 |
33 | 34 |
35 |
36 | 37 |
38 |
39 | 42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | @endsection 51 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Register
9 |
10 | @if (count($errors) > 0) 11 |
12 | Whoops! There were some problems with your input.

13 |
    14 | @foreach ($errors->all() as $error) 15 |
  • {{ $error }}
  • 16 | @endforeach 17 |
18 |
19 | @endif 20 | 21 |
22 | 23 | 24 |
25 | 26 |
27 | 28 |
29 |
30 | 31 |
32 | 33 |
34 | 35 |
36 |
37 | 38 |
39 | 40 |
41 | 42 |
43 |
44 | 45 |
46 | 47 |
48 | 49 |
50 |
51 | 52 |
53 | 54 |
55 | 56 |
57 |
58 | 59 |
60 |
61 | 64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | @endsection 73 | -------------------------------------------------------------------------------- /resources/views/auth/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 |
10 | @if (count($errors) > 0) 11 |
12 | Whoops! There were some problems with your input.

13 |
    14 | @foreach ($errors->all() as $error) 15 |
  • {{ $error }}
  • 16 | @endforeach 17 |
18 |
19 | @endif 20 | 21 |
22 | 23 | 24 | 25 |
26 | 27 |
28 | 29 |
30 |
31 | 32 |
33 | 34 |
35 | 36 |
37 |
38 | 39 |
40 | 41 |
42 | 43 |
44 |
45 | 46 |
47 |
48 | 51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | @endsection 60 | -------------------------------------------------------------------------------- /resources/views/emails/password.blade.php: -------------------------------------------------------------------------------- 1 | Click here to reset your password: {{ url('password/reset/'.$token) }} 2 | -------------------------------------------------------------------------------- /resources/views/errors/503.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 | 35 |
36 |
37 |
Be right back.
38 |
39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /resources/views/vendor/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Larask/gist/70d128ecea9f27de591eb8105394fd62bc97649c/resources/views/vendor/.gitkeep -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | $uri = urldecode( 10 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 11 | ); 12 | 13 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 14 | // built-in PHP web server. This provides a convenient way to test a Laravel 15 | // application without having installed a "real" web server software here. 16 | if ($uri !== '/' and file_exists(__DIR__.'/public'.$uri)) 17 | { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /storage/.gitignore: -------------------------------------------------------------------------------- 1 | laravel.log -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | compiled.php 4 | services.json 5 | events.scanned.php 6 | routes.scanned.php 7 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /tests/ExampleTest.php: -------------------------------------------------------------------------------- 1 | call('GET', '/'); 13 | 14 | $this->assertEquals(200, $response->getStatusCode()); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | make('Illuminate\Contracts\Console\Kernel')->bootstrap(); 15 | 16 | return $app; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /tests/factories/factories.php: -------------------------------------------------------------------------------- 1 | $faker->uuid, 5 | 'name' => $faker->sentence, 6 | 'username' => $faker->unique()->userName, 7 | 'email' => $faker->unique()->email, 8 | 'password' => $faker->words, 9 | ]); 10 | 11 | // And a custom one for anonymous user 12 | $factory('Gist\User', 'anonymous', [ 13 | // 'id' => $faker->uuid, 14 | 'username' => 'anonymous', 15 | 'name' => $faker->sentence, 16 | 'password' => $faker->words, 17 | 'email' => $faker->unique()->email, 18 | ]); 19 | 20 | $factory('Gist\Gist', [ 21 | 'title' => $faker->sentence, 22 | 'content' => $faker->paragraphs, 23 | 'public' => $faker->boolean, 24 | 'user_id' => 'factory:Gist\User', 25 | ]); --------------------------------------------------------------------------------