förälder
incheckning
90d46d273a
3 ändrade filer med 85 tillägg och 17 borttagningar
  1. 2
    1
      bootstrap/start.php
  2. 25
    0
      laravel.md
  3. 58
    16
      readme.md

+ 2
- 1
bootstrap/start.php Visa fil

@@ -26,7 +26,8 @@ $app = new Illuminate\Foundation\Application;
26 26
 
27 27
 $env = $app->detectEnvironment(array(
28 28
 
29
-	'local' => array('RPV20111.rrp.campus', 'homestead'),
29
+	'local' => array(gethostname(), 'RPV20111.rrp.campus', 'homestead'),
30
+    'production' => array('*.com', '*.edu', '*.org'),
30 31
 
31 32
 ));
32 33
 

+ 25
- 0
laravel.md Visa fil

@@ -0,0 +1,25 @@
1
+## Laravel PHP Framework
2
+
3
+[![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework)
4
+[![Total Downloads](https://poser.pugx.org/laravel/framework/downloads.svg)](https://packagist.org/packages/laravel/framework)
5
+[![Latest Stable Version](https://poser.pugx.org/laravel/framework/v/stable.svg)](https://packagist.org/packages/laravel/framework)
6
+[![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework)
7
+[![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework)
8
+
9
+Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching.
10
+
11
+Laravel aims to make the development process a pleasing one for the developer without sacrificing application functionality. Happy developers make the best code. To this end, we've attempted to combine the very best of what we have seen in other web frameworks, including frameworks implemented in other languages, such as Ruby on Rails, ASP.NET MVC, and Sinatra.
12
+
13
+Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked.
14
+
15
+## Official Documentation
16
+
17
+Documentation for the entire framework can be found on the [Laravel website](http://laravel.com/docs).
18
+
19
+### Contributing To Laravel
20
+
21
+**All issues and pull requests should be filed on the [laravel/framework](http://github.com/laravel/framework) repository.**
22
+
23
+### License
24
+
25
+The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

+ 58
- 16
readme.md Visa fil

@@ -1,27 +1,69 @@
1
-## Laravel PHP Framework
1
+## OLAS
2 2
 
3
-[![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework)
4
-[![Total Downloads](https://poser.pugx.org/laravel/framework/downloads.svg)](https://packagist.org/packages/laravel/framework)
5
-[![Latest Stable Version](https://poser.pugx.org/laravel/framework/v/stable.svg)](https://packagist.org/packages/laravel/framework)
6
-[![Latest Unstable Version](https://poser.pugx.org/laravel/framework/v/unstable.svg)](https://packagist.org/packages/laravel/framework)
7
-[![License](https://poser.pugx.org/laravel/framework/license.svg)](https://packagist.org/packages/laravel/framework)
3
+[Laravel 4.2 Docs](https://laravel.com/docs/4.2)
8 4
 
9
-Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching.
5
+[Laravel 4.2 API](https://devdocs.io/laravel~4.2/)
10 6
 
11
-Laravel aims to make the development process a pleasing one for the developer without sacrificing application functionality. Happy developers make the best code. To this end, we've attempted to combine the very best of what we have seen in other web frameworks, including frameworks implemented in other languages, such as Ruby on Rails, ASP.NET MVC, and Sinatra.
7
+[Learn Laravel](https://laracasts.com/series/laravel-from-scratch-2018)
12 8
 
13
-Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked.
9
+### Setup
14 10
 
15
-## Official Documentation
11
+Server requirements: 
12
+- PHP 7.1 with [Composer](https://getcomposer.org/download/)
13
+- MCrypt PHP Extension
16 14
 
17
-Documentation for the entire framework can be found on the [Laravel website](http://laravel.com/docs).
18
-[API Documentation for Laravel 4.2.](https://devdocs.io/laravel~4.2/)
15
+Run `composer install` in the project's root directory.
19 16
 
20
-### Contributing To Laravel
17
+Run the application with `php artisan serve` or see the next section to run in an Apache server.
21 18
 
22
-**All issues and pull requests should be filed on the [laravel/framework](http://github.com/laravel/framework) repository.**
19
+#### Apache
23 20
 
24
-### License
21
+Create a virtualhost with the following settings:
22
+```
23
+DocumentRoot $PATH_TO_PROJECT_ROOT/public
24
+<Directory $PATH_TO_PROJECT_ROOT/public>
25
+    AllowOverride All
26
+    Require all granted
27
+</Directory>
28
+```
25 29
 
26
-The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)
30
+### Configuration
27 31
 
32
+Copy [`.env.php.sample`](.env.php.sample) to `.env.php` and replace with correct settings.
33
+
34
+Other options can be set in `app/config`.
35
+
36
+#### Environments
37
+The environment determines which configuration files will be used. 
38
+Configuration options for each environment can be set in `app/config/$ENV`. 
39
+Options within files in this directory overwrite those in `app/config` with the same file name.
40
+
41
+By default the application will use the `local` environment unless it's running with a **.edu** domain. This can be changed in [`bootstrap/start.php`](bootstrap/start.php) and more environments can be added here.
42
+
43
+### Routes
44
+
45
+Routes tell the application to which controller the request will be sent or which view will be displayed.
46
+
47
+All routes must be registered in [`app/routes.php`](app/routes.php).
48
+
49
+### Migrations
50
+Migrations are used to create the database and make any changes to the schema.
51
+
52
+Migrations are found in `app/database/migrations` and can be generated with 
53
+`php artisan generate:migration $MIGRATION_NAME`. 
54
+
55
+Each migration has an *up* function that performs the migration and a *down* function that reverses it.
56
+
57
+### Views
58
+
59
+Views are the HTML structure for each page or section of a page. They use the blade templating engine.
60
+
61
+Views are found in `app/views`.
62
+
63
+### Controllers
64
+
65
+Controllers handle requests and can return a View, Model, or some other data. They are found in `app/controllers` and usually correspond to a specific Model. 
66
+
67
+Controllers are in charge of preparing any data that might be necessary for a View, or it might create or update new entries for a Model.
68
+
69
+Data can be sent to a View in an array of variables.