Professional Documents
Culture Documents
Submitted by:
Permission is given for the following people to have access to this SP:
EXAMINERS:
Approved Disapproved
i
Abstract
ii
Contents
Acceptance Sheet i
Abstract ii
List of Figures v
I. Introduction 1
A. Background of the Study . . . . . . . . . . . . . . . . . . . . . . 1
B. Statement of the Problem . . . . . . . . . . . . . . . . . . . . . . 2
C. Objectives of the Study . . . . . . . . . . . . . . . . . . . . . . . 2
D. Significance of the Project . . . . . . . . . . . . . . . . . . . . . 5
E. Scope and Limitations . . . . . . . . . . . . . . . . . . . . . . . 5
F. Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
iii
B. Soil Bearing Capacity for Foundations . . . . . . . . . . . . . . . 16
1. Shallow Foundation . . . . . . . . . . . . . . . . . . . . . . . 16
2. Deep Foundation . . . . . . . . . . . . . . . . . . . . . . . . 17
3. Drilled Shaft Foundation . . . . . . . . . . . . . . . . . . . . 18
C. Laravel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
V. Results 27
A. General View . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
B. Admin View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
VI. Discussions 42
VII. Conclusions 43
VIII. Recommendations 44
IX. Bibliography 45
X. Appendix 50
iv
List of Figures
v
29 Receive Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . 39
30 Archive Tagged Project . . . . . . . . . . . . . . . . . . . . . . . . . 39
31 Create Email (with attached compiled report) . . . . . . . . . . . . 39
32 Edit Shallow Foundation . . . . . . . . . . . . . . . . . . . . . . . . 40
33 Edit Deep Foundation . . . . . . . . . . . . . . . . . . . . . . . . . 40
34 Edit Drilled Shaft Foundation . . . . . . . . . . . . . . . . . . . . . 41
vi
List of Tables
vii
I. Introduction
1
for inputting data matrices in order to compute for bearing capacities to be used
in their foundation recommendations. Microsoft Word is also used for compiling
all the reports. The compiled reports which includes the logs, analyses, and rec-
ommendations, are then submitted to the client, which in turn will be submitted
to the building officials.
This study is under computational science, a field in computer science which
uses advanced computing and data analysis for solving scientific and engineering
problems.
The plotting of graphs individually and the use of separate programs tend to be
time-consuming and prone to graphing inaccuracies and formatting errors. For
instance, some graphs are not plotted in a semi-logarithmic scale although they
should be. Certain reports require the users to input the same data repeatedly
because the company’s current applications are not specifically designed for creat-
ing geotechnical investigation reports. This sometimes causes inconsistent inputs,
and consequently, incorrect outputs. Moreover, users tend to forget certain labels
and inputs that are necessary for the analyzation of the reports. As might be
expected, the programs do not notify them of their empty or inconsistent fields.
The company does not make use of existing logging applications because they
are costly. Moreover, they only generate logs and lacks the capability to collabo-
ratively create a document which the company needs. They also do not include
all the graphs and logs required by the company, as well as computing soil bearing
capacities.
2
soil profiles. It will also include the option to choose recommendations provided
by the company, as well as other templates and features necessary for the creation
of the whole report.
i. Borehole log
(h) Add other report sections (as deemed necessary by the engineer)
3
(c) Sign in to/sign out of his/her account
i. Borehole log
(l) Choose from and add the following foundation types to recommend if
report is tagged:
i. Shallow foundation
(m) Add other report sections (as deemed necessary by the engineer)
i. Pending users
4
(r) Download reports in pdf format
1. The program will not include the use of maps and coordinates for visualizing
borehole locations.
2. The program will not create other logs and reports aside from the ones
specified by the company (i.e. aside from borehole logs, liquid and plastic
limits test report, particle size analysis report, and soil profile of boreholes).
F. Assumptions
1. Appropriate permits have been secured before adding data to the system.
2. Laboratory results and analysis are just entered in the system; they are not
created by the system.
5
4. The users of the program have knowledge in geotechnical investigation or
are qualified engineers to avoid misusage.
6
II. Review of Related Literature
A borehole is a drilled or dug hole into the subsurface for extracting or investi-
gating a material at a certain depth. Boreholes are commonly cylindrical, deep
and narrow. The earliest deep boreholes were bored by the Chinese and had a
maximum depth of around 200 m. Some of the earliest borehole records date back
to the 18th century [3].
One of the main purposes for drilling boreholes is site investigation and con-
struction [3]. It plays an important role in design and analyses of projects [4].
According to the New York City Building Code under 1802.4 [8], soil character-
istics shall be based on tests and observations disclosed by borings, test pits, or
other subsurface exploration methods.
Boreholes are also used as water supply. For instance, many people depend on
boreholes as their water supply in Nigeria [9]. Water distribution facilities fail to
deliver or meet the water requirements of the community due to certain factors.
The scarcity of water made it necessary to find alternative sources of water [10, 11].
In a desperate attempt to obtain water, landlords have drilled boreholes in order
to tap the groundwater [10]. Although groundwater is generally a ”safe source”
of drinking water because of its low microbial load, groundwater resources are
susceptible to pollution [12].
In the oil and gas industry, boreholes are specifically used for the analysis of
the properties of geological formations such as rocks ”to find hydrocarbon zones
in the geological formations intersected by a borehole” [13].
Borehole logging, also known as well logging [13], is the process of making a
detailed record of geological formation [14]. The detailed record is called a borehole
log, which is a basic visualization tool in analyzing subsurface characteristics [4]
and formation samples made by instruments that are lowered into a borehole [14].
Electric well logging is considered invented by Conrad and Marcel Schlum-
7
berger. The first well log was created on September 15, 1927, when one of Schlum-
berger’s men working for him lowered an electric tool in a well in Pechelbronn,
Alsace, France [14].
8
and water level monitoring properties. Particle size distributions of the samples
were determined using sieve analysis. The results indicated low to medium plas-
ticity silty clay. Under the clay was a layer of loose to medium dense and dense
sand. The researchers suggested that proposed structures in the area be supported
by raft foundation within the upper clay layer.
Yusuf et al. [18] studied productivity and quality analysis of borehole water
in selected locations in Nigeria. Pumping test was carried out to determine the
discharge from the boreholes sampled. Seven boreholes were functional out of ten
sampled in Offa. Four out of five boreholes sampled in Erin-Ile were working, while
only 13 out of 21 boreholes sampled in Ilesa were working. Three boreholes were
sampled in Osogbo with only one functional. The results revealed that boreholes
can relieve water problem in the areas during dry season in the country as it
gives considerable quantity of water. Boreholes are also usually free from E-Coli
bacteria and other pathogens. Moreover, chemical contents in the samples were
determined to cause no disease to humans. Therefore, groundwater of boreholes
in the mentioned locations is suitable for consumption.
A study for road construction purposes, conducted by Youdeowei and Nwankwoala
[19], aimed to investigate subsurface by drilling boreholes within and along the
Nun River Channel covering three communities. Eight boreholes with a maxi-
mum depth of 14 m from the river bed were drilled in the three locations. Results
showed very fine grained and high plasticity clay soil with soft to stiff consistency
in the borehole samples. The unit varies in depth and beneath were medium
grained sands.
Another study [20] aimed to determine subsoil profiles and geotechnical char-
acteristics in parts of Yenagoa, Bayelsa State, Nigeria. Four boreholes were drilled
in the area and samples were representative samples were collected. The results re-
vealed that the area is predominantly underlain by medium to firm silty clay, with
some silty sand in different depths and boreholes. Water level was also recorded
as well as moisture content, liquid limit, plastic limit, plasticity index, liquidity
9
index, and hydraulic conductivity. This study had analyzed the area to be used
for future foundation designs in order to minimize post construction problems.
The studies differ in their purposes for applying borehole logging methods.
The first two applied borehole logging methods for building constructions pur-
poses. Other purposes are for groundwater analysis and road construction. It is
also used in the oil and gas industry [13]. This shows that borehole testing and
logging is thus a very significant part of the analysis of geotechnical subsurfaces
and formations for engineering, hydrogeology, and such.
C. Related Systems
1. gINT Logs
gINT Logs is a software for creating and managing borehole logs and geophysical
logs. gINT provides two more applications: gINT Professional and gINT Profes-
sional Plus. The former also provides the capabilities of gINT Logs along with
additional features. With gINT Professional, subsurface data can be managed
using custom reports which includes graphics, photos, charts, maps, and more. It
allows the user to create fence diagrams, graphs, tables, and such. gINT Profes-
sional Plus, on the other hand, provides SQL Server support for a more powerful
reporting and centralized data management [21].
2. Strater
R
4
Strater, like gINT Logs, is also basically a visualization software for borehole logs,
maps, and cross sections. Strater offers a modern, intuitive and easy-to-use user
interface as well as design and layout flexibility. It also offers 14 customizable log
types for subsurface data representations [22].
3. LogPlot
LogPlot is another borehole log software. It features LogPlot Log Designer which
offers user-friendly and flexible borehole log designs. It also offers LogPlot Data
10
Designer which has a tabbed spreadsheet window for easier inputting of data.
Users can also print and export logs with LogPlot [23]. A standard single li-
cense costs $699.00, while a 3-pack and 5-pack single license costs $1,887.30 and
$2,621.25, respectively [24].
4. LOGDRAFT
11
III. Theoretical Framework
A. Geotechnical Investigation
12
investigation shall be signed, sealed, and submitted by the engineer accountable,
where required by the commissioner. The written report shall include information
specified under section 1802.6. Among many are: a plot of the borehole locations, a
record of the soil profile and soil sample descriptions, results of laboratory testing,
recommendations for foundation type and design criteria, and pile foundation
recommendations.
The mentioned information will be summarized by the program by generating
the following subreports:
1. Borehole Log
13
Figure 1: Example of borehole log [21]
Soil profile is one of the basis used by soil scientists and other professionals for un-
derstanding soil properties. The profile description should accurately correspond
to what is observed in the site. The level of detail depends on the objective of
the client, proposed land use, and observation method. However, most (if not all)
soil profile descriptions include horizon, depth, soil properties of structure, color,
structure, consistence, and thickness [28].
14
data for identifying and classifying clays [30]. The upper limit of the range of water
content over which the soil is in plastic state is defined as the liquid limit (wL ),
while the lower limit is defined as the plastic limit (wP ). Their difference, the
water content range, is the plasticity index (IP ) [29].
IP = wP − wL (1)
Test results are plotted on a semilogarithmic plot with water content as the
ordinates and number of blows as the abscissa [31].
Particle size analysis, also called grain size analysis, determines the size range and
distribution of a soil. After passing through a series of standard test sieves to
determine the particle size of the soil sample, the size distribution is plotted. It
is represented as a curve on a semilogarithmic plot, ith the percentage by mass
of particles smaller than the size ranges as the ordinates and the size ranges (see
Figure 2) as the abscissa. Steeper curve means smaller particle size range and
flatter curve means larger size range [29].
15
Figure 3: Example of particle size distribution curves [29]
1. Shallow Foundation
Bearing capacity and settlement are the two key properties necessary in the design
of shallow foundations. House subdivisions, antenna towers, bridges, and power
16
plants are some of the structures which can be constructed on shallow foundations
[34].
The classical bearing capacity equation for long footings [5], developed by
Terzaghi & Peck in the 1940’s, is as follows:
B = footing width
2. Deep Foundation
Bearing capacity and settlement are the two key properties necessary in the design
of shallow foundations. House subdivisions, antenna towers, bridges, and power
plants are some of the structures which can be constructed on shallow foundations
[34].
The classical bearing capacity equation for long footings [5], developed by
Terzaghi & Peck in the 1940’s, is as follows:
17
where Nc , Nγ , Nq = soil bearing capacity factors whose values depend
B = footing width
Bearing capacity and settlement are the two key properties necessary in the design
of shallow foundations. House subdivisions, antenna towers, bridges, and power
plants are some of the structures which can be constructed on shallow foundations
[34].
The classical bearing capacity equation for long footings [5], developed by
Terzaghi & Peck in the 1940’s, is as follows:
18
where Nc , Nγ , Nq = soil bearing capacity factors whose values depend
B = footing width
C. Laravel
19
IV. Design and Implementation
The system will have two users: engineers and system administrator.
The engineers will be able to register an account, sign in and out of their
accounts, manage borehole information, manage sample information, create sub-
reports and report sections, tag projects, and view and download reports.
The system administrator will be able to do everything an engineer can. He/she
will also be responsible for managing user accounts, adding and removing engineers
from a project, adding and deleting proects, archiving projects, calculate bearing
capacities, receive notifications, and send reports via email.
20
B. Context Diagram
The system has two types of users, namely the system administrator (lead engi-
neer) and regular users (engineers). Since the system administrator is also the
lead engineer, he/she is able to access all resources. Only the regular users have
limited access to functionalities and resources.
21
Figure 6: Entity Relationship Diagram
22
D. Data Dictionary
Table 1: users - contains both the system administrator (lead engineer) and the
engineers
23
Table 3: boreholes - contains a borehole’s information
24
Table 4: samples - contains the soil samples taken from a borehole
25
E. System Architecture
The program is coded in PHP using the Laravel PHP framework. It uses a MySQL
database and is deployed on an Apache server. The program is be compatible for
most browsers however, Mozilla Firefox or Google Chrome is recommended.
F. Technical Architecture
The following are the minimum requirements for the server machine:
• PHP v5.6
• MySQL v5
• Apache v4
• 500 MB RAM
The following are the minimum requirements for the client machine:
• 1 GB RAM
Recommended browsers:
26
V. Results
A. General View
Figure 7 shows the login page. This also serves as the home page of unauthorized
users.
Users with no existing account in the system can register an account by clicking
’Create an account’ on the login page. The registration page is then shown after
clicking the link (see Figure 8).
27
Figure 8: Registration Page
28
Most of the functionalities that users need are in the project page (see Figures
10 and 11). Here, users can edit the project, tag it (if it is active), add borehole
information, manage subreports and sections, and view the generated (compiled)
report.
29
Figure 12: Edit Project Information
30
Figure 14: Add Sample Information
31
Figure 16: View Detailed Sample Information
After adding complete boreholes and samples information, users can manage
(create, edit, view, and delete) subreports. The following figures show the views
of the subreports.
32
Figure 18: View Liquid and Plastic Limits Test Report
33
Figure 20: View Soil Profile
Users can also manage (create, edit, view, and delete) report sections as shown
in the following figures.
34
Figure 21: View Existing Sections and Add New Section
35
Figure 23: Edit Section
The report will be generated properly after subreports and sections have been
successfully added. Users can view and download the report in the project’s main
page (see Figure 10).
B. Admin View
The following figures show the pages and functionalities that only the administra-
tor can access.
36
Figure 25: Manage Users
37
Figure 27: Manage Projects
38
Figure 29: Receive Notifications
An email containing the attached compiled report can be created if the project
is already tagged.
39
After adding complete boreholes and samples information, the administrator
can manage (create, edit, view, and delete) data for computing bearing capacities.
The following figures show the edit pages of the module.
40
Figure 34: Edit Drilled Shaft Foundation
41
VI. Discussions
42
VII. Conclusions
43
VIII. Recommendations
The system can be extended by adding more capability to its user account man-
agement. Users can have different roles (e.g. lead engineer, associate engineer,
etc.) in different projects. The system administrator and the lead engineer are to
be separated in this design. Thus, the system administrator will only be the one
who manages the operation of the system and its database.
Moreover, future developers can also add maps in order to view the site using
coordinates that are to be inputted by the users. More preferrably, they can
add the top view of the investigation site, in order to have a better look at the
boreholes’ locations.
For better visualization, graphs and logs can be improved aesthetically. More
borehole or sample details can also be added so that the users (or anyone will read
the document) can analyze the graphs and logs more effectively.
44
IX. Bibliography
[4] C. Zhang, A. Li, and L. Zhou, “An extensible borehole log model,” in 2011
19th International Conference on Geoinformatics, (Shanghai), pp. 1–5, IEEE,
2011.
45
[11] J. O. Jeje and K. T. Oladepo, “Assessment of heavy metals of boreholes and
hand dug wells in ife north local government area of osun state, nigeria,”
International Journal of Science and Technology, vol. 3, 2014.
[13] S. Gaci, “Regularity analysis of oil exploration borehole logs,” in 2013 8th In-
ternational Symposium on Image and Signal Processing and Analysis (ISPA),
(Trieste, Italy), pp. 456–461, IEEE, 2013.
[14] S. Imran and N. Khan, “Experimental Study of Borehole Logs for Oil and
Gas Exploration,” in 2015 29th International Conference on Advanced In-
formation Networking and Applications Workshops, (Gwangiu), pp. 117–122,
IEEE, 2015.
46
[19] P. O. Youdeowei and H. O. Nwankwoala, “Studies on sub-soil characteristics
of sand deposits in some parts of bayelsa state, eastern niger delta, nigeria,”
Journal of Soil Science and Environmental Management, vol. 2, 2011.
47
[28] S. Logsdon, D. Clay, D. Moore, and T. Tsegaye, eds., Soil Science: Step-
by-Step Field Analysis. Wisconsin, USA: Soil Science Society of America,
2008.
[29] R. F. Craig, Craig’s Soil Mechanics. New York, USA: Taylor & Francis, 2004.
[30] G. M. Reeves, I. Sims, and J. C. Cripps, eds., Clay Materials Used in Con-
struction. London, England: The Geological Society, 2006.
[35] Laravel, “Laravel - the php framework for web artisans.” http://www.
laravel.com. Accessed: 2015-12-1.
48
[38] Google Trends, “Google trends - web search interest: laravel, codeigniter,
cakephp, zend framework, yii - worldwide, jan 2010 - jul 2015.” http://www.
google.com/trends/explore/, 2015. Accessed: 2015-12-1.
49
X. Appendix
50
{ Listing 5: BoreholeController.php
/∗
| Password Reset C o n t r o l l e r <?php
|
| This c o n t r o l l e r i s r e s p o n s i b l e f o r namespace App\ Http \ C o n t r o l l e r s ;
handling password r e s e t r e q u e s t s
| and u s e s a s i m p l e t r a i t t o i n c l u d e t h i s use Auth ;
b e h a v i o r . You ’ r e f r e e t o use DB;
| e x p l o r e t h i s t r a i t and o v e r r i d e any use Helper ;
m e t h o d s you w i s h t o t w e a k . use Gate ;
| use App\ A c t i v i t y ;
∗/ use App\ B o r e h o l e ;
use App\ P r o j e c t ;
use ResetsPasswords ; use I l l u m i n a t e \ Http \ R e q u e s t ;
use App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ;
/∗ ∗ use App\ Http \ R e q u e s t s \ B o r e h o l e \
∗ C r e a t e a new p a s s w o r d c o n t r o l l e r StoreBoreholeRequest ;
instance . u s e App\ Http \ R e q u e s t s \ B o r e h o l e \
∗ UpdateBoreholeRequest ;
∗ @return v oi d
∗/ c l a s s BoreholeController extends Controller
public function construct () {
{ /∗ ∗
$ t h i s −>m i d d l e w a r e ( ’ g u e s t ’ ) ; ∗ Display a l i s t i n g of the resource .
} ∗
} ∗ @return \ I l l u m i n a t e \ Http \ Response
∗/
public function index ( )
{
Listing 4: ActivityController.php }
//
<?php
/∗ ∗
namespace App\ Http \ C o n t r o l l e r s ; ∗ Show t h e f o r m f o r c r e a t i n g a new
resource .
use DB; ∗
use Gate ; ∗ @return \ I l l u m i n a t e \ Http \ Response
use App\ A c t i v i t y ; ∗/
use I l l u m i n a t e \ Http \ R e q u e s t ; public function create ( $id )
use App\ Http \ R e q u e s t s ; {
use App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ; $project = Project : : findOrFail ( $id ) ;
51
’ b h w a t e r e l e v a t i o n ’ => $ r e q u e s t −>
bh water elevation , // U p d a t e b o r e h o l e i n f o r m a t i o n
’ b h s u r f a c e e l e v a t i o n ’ => $ r e q u e s t $ b o r e h o l e −>u p d a t e ( [
−>b h s u r f a c e e l e v a t i o n ’ b h s t a r t d a t e ’ => $ r e q u e s t −>
]) ; bh start date ,
’ b h e n d d a t e ’ => $ r e q u e s t −>
// I n c r e m e n t t h e number o f b o r e h o l e s bh end date ,
in p r o j e c t t a b l e ’ bh num ’ => $ r e q u e s t −>bh num ,
DB : : t a b l e ( ’ p r o j e c t s ’ )−>w h e r e I d ( ’ bh max depth ’ => $ r e q u e s t −>
$ r e q u e s t −>p r o j i d )−>i n c r e m e n t ( ’ bh max depth ,
proj num of boreholes ’ ) ; ’ b h w e a t h e r ’ => $ r e q u e s t −>
bh weather ,
$project = Project : : findOrFail ( ’ b h o p e r a t o r ’ => $ r e q u e s t −>
$ r e q u e s t −>p r o j i d ) ; bh operator ,
’ b h d r i l l r i g ’ => $ r e q u e s t −>
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e bh drill rig ,
Activity : : create ([ ’ b h d r i l l p u m p ’ => $ r e q u e s t −>
’ p r o j i d ’ => $ r e q u e s t −>p r o j i d , bh drill pump ,
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , ’ bh hammer weight ’ => $ r e q u e s t −>
’ a c t i v i t y t y p e ’ => ” B o r e h o l e <i > bh hammer weight ,
$ r e q u e s t −>bh num</i > i n ’ b h h e i g h t o f d r o p ’ => $ r e q u e s t −>
p r o j e c t <i >$ p r o j e c t −> bh height of drop ,
p r o j n a m e </i > h a s been ’ b h c a s i n g ’ => $ r e q u e s t −>b h c a s i n g
created . ” ,
]) ; ’ b h r o d ’ => $ r e q u e s t −>b h r o d ,
’ b h s a m p l e r ’ => $ r e q u e s t −>
$ f l a s h m e s s a g e = ” B o r e h o l e $ r e q u e s t −> bh sampler ,
bh num i n p r o j e c t $ p r o j e c t −> ’ b h w a t e r e l e v a t i o n ’ => $ r e q u e s t −>
p r o j n a m e h a s been s u c c e s s f u l l y bh water elevation ,
created . ” ; ’ b h s u r f a c e e l e v a t i o n ’ => $ r e q u e s t
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ b o r e h o l e s . −>b h s u r f a c e e l e v a t i o n
show ’ , $ b o r e h o l e −>i d )−>w i t h ( ’ ]) ;
success ’ , $flash message ) ;
} // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
Activity : : create ([
/∗ ∗ ’ p r o j i d ’ => $ p r o j e c t −>i d ,
∗ Display the s p e c i f i e d resource . ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
∗ ’ a c t i v i t y t y p e ’ => ” B o r e h o l e <i >
∗ @param int $id $ r e q u e s t −>bh num</i > i n
∗ @return \ I l l u m i n a t e \ Http \ Response p r o j e c t <i >$ p r o j e c t −>
∗/ p r o j n a m e </i > h a s been
p u b l i c f u n c t i o n show ( $ i d ) modified . ”
{ ]) ;
$borehole = Borehole : : findOrFail ( $id ) ;
$ p r o j e c t = B o r e h o l e : : f i n d ( $ b o r e h o l e −> $ f l a s h m e s s a g e = ” B o r e h o l e $ r e q u e s t −>
i d )−>p r o j e c t ; bh num i n p r o j e c t $ p r o j e c t −>
p r o j n a m e h a s been s u c c e s s f u l l y
if ( Gate : : d e n i e s ( ’ show−b o r e h o l e ’ , modified . ” ;
$project ) ) { r e t u r n r e d i r e c t ( )−>r o u t e ( ’ b o r e h o l e s .
abort (403) ; show ’ , $ b o r e h o l e −>i d )−>w i t h ( ’
} success ’ , $flash message ) ;
}
$ s a m p l e s = B o r e h o l e : : f i n d ( $ b o r e h o l e −>
i d )−>s a m p l e s ; /∗ ∗
∗ Remove t h e s p e c i f i e d r e s o u r c e f r o m
r e t u r n v i e w ( ’ b o r e h o l e s . show ’ , array ( ’ storage .
b o r e h o l e ’ => $ b o r e h o l e , ’ p r o j e c t ’ ∗
=> $ p r o j e c t , ’ s a m p l e s ’ => ∗ @param int $id
$samples ) ) ; ∗ @return \ I l l u m i n a t e \ Http \ Response
} ∗/
public function destroy ( $id )
/∗ ∗ {
∗ Show t h e f o r m f o r e d i t i n g t h e s p e c i f i e d $borehole = Borehole : : findOrFail ( $id ) ;
resource .
∗ if ( Gate : : d e n i e s ( ’ b o r e h o l e ’ , $ b o r e h o l e
∗ @param int $id −>p r o j e c t ) ) {
∗ @return \ I l l u m i n a t e \ Http \ Response abort (403) ;
∗/ }
public function edit ( $id )
{ $ b h i d = $ b o r e h o l e −>i d ;
$borehole = Borehole : : findOrFail ( $id ) ; $bh num = $ b o r e h o l e −>bh num ;
$ p r o j e c t = B o r e h o l e : : f i n d ( $ b o r e h o l e −> $ p r o j i d = $ b o r e h o l e −>p r o j i d ;
i d )−>p r o j e c t ;
$ b o r e h o l e −>d e l e t e ( ) ;
if ( Gate : : d e n i e s ( ’ b o r e h o l e ’ , $project )
) { return BoreholeController : :
abort (403) ; recordDeleteActivity ( $proj id ,
} $bh num ) ;
}
r e t u r n v i e w ( ’ b o r e h o l e s . e d i t ’ , array ( ’
b o r e h o l e ’ => $ b o r e h o l e , ’ p r o j e c t ’ public function recordDeleteActivity (
=> $ p r o j e c t ) ) ; $ p r o j i d , $bh num )
} {
// D e c r e m e n t t h e number o f b o r e h o l e s
/∗ ∗ in p r o j e c t t a b l e
∗ Update t h e s p e c i f i e d r e s o u r c e i n DB : : t a b l e ( ’ p r o j e c t s ’ )−>w h e r e I d (
storage . $ p r o j i d )−>d e c r e m e n t ( ’
∗ proj num of boreholes ’ ) ;
∗ @param \ I l l u m i n a t e \ Http \ Request
$request // Change b o r e h o l e number o f t h e r e s t
∗ @param int $id of the boreholes accordingly
∗ @return \ I l l u m i n a t e \ Http \ Response $ b o r e h o l e s = B o r e h o l e : : where ( ’ p r o j i d ’
∗/ , $proj id )
p u b l i c f u n c t i o n update ( −>where ( ’ bh num ’ , ’> ’ , $bh num )
UpdateBoreholeRequest $request , $id ) −>g e t ( ) ;
{
$borehole = Borehole : : findOrFail ( $id ) ; foreach ( $ b o r e h o l e s a s $ b o r e h o l e ) {
$project = Project : : findOrFail ( DB : : t a b l e ( ’ b o r e h o l e s ’ )−>w h e r e I d (
$ r e q u e s t −>p r o j i d ) ; $ b o r e h o l e −>i d )−>d e c r e m e n t ( ’
52
bh num ’ ) ; $ s u b r e p o r t = S u b r e p o r t : : where (
} $matchThese )−> f i r s t ( ) ;
$ d a t a p o i n t s = D a t a P o i n t : : where ( ’
$project = Project : : findOrFail ( s u b r e p o r t i d ’ , $ s u b r e p o r t −>i d )−>
$proj id ) ; get () ;
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e
Activity : : create ([ DataPointController : : isUpdated (
’ p r o j i d ’ => n u l l , $ p r o j e c t −>i d , $ s a m p l e s ,
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , $data points ) ;
’ a c t i v i t y t y p e ’ => ” B o r e h o l e <i >
$bh num</i > i n <i >$ p r o j e c t −> r e t u r n v i e w ( ’ d a t a p o i n t s . i n d e x ’ , array (
p r o j n a m e </i > h a s been ’ p r o j e c t ’ => $ p r o j e c t , ’ b o r e h o l e s
deleted . ” ’ => $ b o r e h o l e s , ’ s a m p l e s ’ =>
]) ; $ s a m p l e s , ’ s u b r e p o r t ’ =>
$ s u b r e p o r t , ’ d a t a p o i n t s ’ =>
$ f l a s h m e s s a g e = ” B o r e h o l e $bh num i n $data points ) ) ;
p r o j e c t $ p r o j e c t −>p r o j n a m e h a s }
been s u c c e s s f u l l y d e l e t e d . ” ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s . /∗ ∗
show ’ , $ p r o j i d )−>w i t h ( ’ s u c c e s s ’ , ∗ Show t h e f o r m f o r c r e a t i n g a new
$flash message ) ; resource .
} ∗
} ∗ @return \ I l l u m i n a t e \ Http \ Response
∗/
public function create ( $id )
{
Listing 6: Controller.php $project = Project : : findOrFail ( $id ) ;
<?php if ( Gate : : d e n i e s ( ’ data−p o i n t ’ ,
$project ) ) {
namespace App\ Http \ C o n t r o l l e r s ; abort (403) ;
}
use I l l u m i n a t e \ F o u n d a t i o n \Bus\ D i s p a t c h e s J o b s ;
use I l l u m i n a t e \ Routing \ C o n t r o l l e r as // Check i f s u b r e p o r t i s a l r e a d y i n
BaseController ; the database
use I l l u m i n a t e \ Foundation \ V a l i d a t i o n \ $matchThese = [ ’ p r o j i d ’ => $ p r o j e c t −>
ValidatesRequests ; i d , ’ s b k e y ’ => 0 ] ;
use I l l u m i n a t e \ F o u n d a t i o n \Auth\ A c c e s s \ $match = DB : : t a b l e ( ’ s u b r e p o r t s ’ )−>
AuthorizesRequests ; where ( $matchThese )−> f i r s t ( ) ;
abstract class Controller extends i f ( i s n u l l ( $match ) ) {
BaseController $ b o r e h o l e s = DB : : t a b l e ( ’ boreholes ’
{ )
use AuthorizesRequests , DispatchesJobs , −>j o i n ( ’ p r o j e c t s ’ , ’ boreholes .
ValidatesRequests ; p r o j i d ’ , ’= ’ , ’ projects .
} id ’ )
−>where ( ’ b o r e h o l e s . proj id ’ ,
$id )
Listing 7: DataPointController.php −> s e l e c t ( ’ b o r e h o l e s
−>g e t ( ) ;
. id ’ )
<?php
if ( s i z e o f ( $ b o r e h o l e s ) > 0 ) { //
namespace App\ Http \ C o n t r o l l e r s ; I f th ere are b o r e h o l e s in
project
use Auth ; $i = 0;
use DB; foreach ( $ b o r e h o l e s a s
use Input ; $borehole ) {
use Gate ; $ s a m p l e s = DB : : t a b l e ( ’
use App\ A c t i v i t y ; samples ’ )
use App\ D a t a P o i n t ; −>j o i n ( ’ b o r e h o l e s ’ , ’
use App\ P r o j e c t ; samples . bh id ’ , ’
use App\ Sample ; =’ , ’ boreholes . id
use App\ S u b r e p o r t ; ’)
use I l l u m i n a t e \ Http \ R e q u e s t ; −>where ( ’ s a m p l e s . b h i d
use App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ; ’ , $ b o r e h o l e −>i d )
use App\ Http \ R e q u e s t s \ D a t a P o i n t \ −> s e l e c t ( ’ s a m p l e s . i d ’ )
StoreDataPointRequest ; −>g e t ( ) ;
u s e App\ Http \ R e q u e s t s \ D a t a P o i n t \
UpdateDataPointRequest ; $boreholes [ $i ] = $borehole
−>i d ;
c l a s s DataPointController extends Controller $j = 0;
{
/∗ ∗ i f ( sizeof ( $samples ) > 0) {
∗ Display a l i s t i n g of the resource . // I f t h e r e a r e
∗ samples in current
∗ @return \ I l l u m i n a t e \ Http \ Response borehole
∗/ foreach ( $ s a m p l e s a s
public function index ( $id ) $sample ) {
{ $counts [ $i ] [ $j ] =
$project = Project : : findOrFail ( $id ) ; $sample−>i d ;
$ j ++;
if ( Gate : : d e n i e s ( ’ i n d e x −data−p o i n t ’ , }
$project ) ) { }
abort (403) ; $ i ++;
} }
}
$boreholes = Project : : findOrFail ( else {
$ p r o j e c t −>i d )−>b o r e h o l e s ; $counts = 0;
$ s a m p l e s = Sample : : j o i n ( ’ b o r e h o l e s ’ , ’ }
s a m p l e s . b h i d ’ , ’= ’ , ’ b o r e h o l e s .
id ’ ) i f ( ! isset ( $counts ) ) {
−>where ( ’ b o r e h o l e s . p r o j i d ’ , $counts = 0;
$ p r o j e c t −>i d ) }
−> s e l e c t ( ’ s a m p l e s . i d ’ , ’ s a m p l e s .
b h i d ’ , ’ s a m p l e s . sample num ’ ) DataPointController : :
−>g e t ( ) ; c h e c k P r e r e q u i s i t e s ( $counts ) ;
53
’ b o r e h o l e s ’ => $ b o r e h o l e s , ’ ∗ @return \ I l l u m i n a t e \ Http \ Response
c o u n t s ’ => $ c o u n t s ) ) ; ∗/
} p u b l i c f u n c t i o n show ( $ i d )
else { {
$ f l a s h m e s s a g e = ” G r ai n S o i l //
Analysis in project $project }
−>p r o j n a m e a l r e a d y e x i s t s .
You c a n n o t c r e a t e a n o t h e r /∗ ∗
i n s t a n c e of the subreport . ” ; ∗ Show t h e f o r m f o r e d i t i n g t h e s p e c i f i e d
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s resource .
. show ’ , $ p r o j e c t −>i d )−>w i t h ( ’ ∗
error ’ , $flash message ) ; ∗ @param int $id
} ∗ @return \ I l l u m i n a t e \ Http \ Response
} ∗/
public function edit ( $id )
/∗ ∗ {
∗ Store a newly c r e a t e d resource in $project = Project : : findOrFail ( $id ) ;
storage .
∗ if ( Gate : : d e n i e s ( ’ data−p o i n t ’ ,
∗ @param \ I l l u m i n a t e \ Http \ Request $project ) ) {
$request abort (403) ;
∗ @return \ I l l u m i n a t e \ Http \ Response }
∗/
public function store ( $boreholes = Project : : findOrFail (
StoreDataPointRequest $request ) $ p r o j e c t −>i d )−>b o r e h o l e s ;
{ $ s a m p l e s = Sample : : j o i n ( ’ b o r e h o l e s ’ , ’
$project = Project : : findOrFail ( s a m p l e s . b h i d ’ , ’= ’ , ’ b o r e h o l e s .
$ r e q u e s t −>p r o j i d ) ; id ’ )
−>where ( ’ b o r e h o l e s . p r o j i d ’ ,
// Check i f s u b r e p o r t i s a l r e a d y i n $ p r o j e c t −>i d )
the database −> s e l e c t ( ’ s a m p l e s . i d ’ , ’ s a m p l e s .
$matchThese = [ ’ p r o j i d ’ => $ p r o j e c t −> b h i d ’ , ’ s a m p l e s . sample num ’ )
i d , ’ s b k e y ’ => 0 ] ; −>g e t ( ) ;
$match = DB : : t a b l e ( ’ s u b r e p o r t s ’ )−>
where ( $matchThese )−> f i r s t ( ) ; $matchThese = [ ’ p r o j i d ’ => $ p r o j e c t −>
i d , ’ s b k e y ’ => 0 ] ;
i f ( i s n u l l ( $match ) ) { $ s u b r e p o r t = S u b r e p o r t : : where (
// S t o r e d a t a t o s u b r e p o r t s t a b l e $matchThese )−> f i r s t ( ) ;
$input sb [ ’ sb key ’ ] = 0; $ d a t a p o i n t s = D a t a P o i n t : : where ( ’
$ i n p u t s b [ ’ p r o j i d ’ ] = $ p r o j e c t −> s u b r e p o r t i d ’ , $ s u b r e p o r t −>i d )−>
id ; get () ;
$subreport = Subreport : : c r e a t e (
$input sb ) ; DataPointController : : isUpdated (
$ p r o j e c t −>i d , $ s a m p l e s ,
// S t o r e d a t a t o d a t a p o i n t s t a b l e $data points ) ;
f o r ( $ i = 0 ; $ i < s i z e o f ( $ r e q u e s t −>
s a m p l e i d ) ; $ i ++) { r e t u r n v i e w ( ’ d a t a p o i n t s . e d i t ’ , array ( ’
DataPoint : : c r e a t e ( [ p r o j e c t ’ => $ p r o j e c t , ’ b o r e h o l e s ’
’ s a m p l e i d ’ => $ r e q u e s t −> => $ b o r e h o l e s , ’ s a m p l e s ’ =>
sample id [ $i ] , $ s a m p l e s , ’ s u b r e p o r t ’ =>
’ s u b r e p o r t i d ’ => $ s u b r e p o r t , ’ d a t a p o i n t s ’ =>
$ s u b r e p o r t −>i d , $data points ) ) ;
’ x i n t ’ => $ r e q u e s t −>x i n t }
[ $i ] ,
’ y i n t ’ => $ r e q u e s t −>y i n t /∗ ∗
[ $i ] ∗ Update t h e s p e c i f i e d r e s o u r c e i n
]) ; storage .
} ∗
∗ @param \ I l l u m i n a t e \ Http \ Request
// Add t h e a c t i v i t y t o a c t i v i t y $request
table ∗ @param int $id
Activity : : create ([ ∗ @return \ I l l u m i n a t e \ Http \ Response
’ p r o j i d ’ => $ p r o j e c t −>i d , ∗/
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , p u b l i c f u n c t i o n update (
’ a c t i v i t y t y p e ’ => ” Data UpdateDataPointRequest $ r e q u e s t , $ i d )
p o i n t s f o r t h e G ra i n S o i l {
A n a l y s i s i n p r o j e c t <i > // U p d a t e d a t a i n d a t a p o i n t s t a b l e
$ p r o j e c t −>p r o j n a m e </i > f o r ( $ i = 0 ; $ i < s i z e o f ( $ r e q u e s t −>
h a s been c r e a t e d . ” d a t a p o i n t i d ) ; $ i ++) {
]) ; $ d a t a p o i n t = DataPoint : :
f i n d O r F a i l ( $ r e q u e s t −>
$ f l a s h m e s s a g e = ” Data p o i n t s f o r data point id [ $i ]) ;
t h e G ra i n S o i l A n a l y s i s i n
p r o j e c t $ p r o j e c t −>p r o j n a m e $ d a t a p o i n t −>u p d a t e ( [
h a s been s u c c e s s f u l l y c r e a t e d ’ x i n t ’ => $ r e q u e s t −>x i n t [ $ i
.”; ],
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ ’ y i n t ’ => $ r e q u e s t −>y i n t [ $ i ]
s u b r e p o r t s . showGSA ’ , ]) ;
$ s u b r e p o r t −>i d )−>w i t h ( ’ }
success ’ , $flash message ) ;
} $project = Project : : findOrFail (
else { $ r e q u e s t −>p r o j i d ) ;
$ f l a s h m e s s a g e = ” G r ai n S o i l // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
Analysis in project $project Activity : : create ([
−>p r o j n a m e a l r e a d y e x i s t s . ’ p r o j i d ’ => $ p r o j e c t −>i d ,
You c a n n o t c r e a t e a n o t h e r ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
i n s t a n c e of the subreport . ” ; ’ a c t i v i t y t y p e ’ => ” Data p o i n t s
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s f o r t h e G ra i n S o i l A n a l y s i s
. show ’ , $ p r o j e c t −>i d )−>w i t h ( ’ i n p r o j e c t <i >$ p r o j e c t −>
error ’ , $flash message ) ; p r o j n a m e </i > h a s been
} modified . ”
]) ;
} $ f l a s h m e s s a g e = ” Data p o i n t s f o r t h e
G r ai n S o i l A n a l y s i s i n p r o j e c t
/∗ ∗ $ p r o j e c t −>p r o j n a m e h a s been
∗ Display the specified resource . s u c c e s s f u l l y modified . ” ;
∗ r e t u r n r e d i r e c t ( )−>r o u t e ( ’ s u b r e p o r t s .
∗ @param int $id showGSA ’ , $ i d )−>w i t h ( ’ s u c c e s s ’ ,
54
$flash message ) ; $ i s u p d a t e d = true ;
} break ;
}
/∗ ∗ $ i ++;
∗ Remove t h e s p e c i f i e d r e s o u r c e f r o m }
storage . }
∗
∗ @param int $id i f ( $is updated ) {
∗ @return \ I l l u m i n a t e \ Http \ Response $route = route ( ’ datapoints .
∗/ deleteAndCreate ’ , $ p r o j i d ) ;
public function destroy ( $id ) $ f l a s h m e s s a g e = ” Samples were
{ recently modified . Please
$subreport = Subreport : : findOrFail ( $id u p d a t e t h e d a t a by <a h r e f=
); $ r o u t e c l a s s =’ btn btn−l i n k
btn−sm’> c r e a t i n g a new one </a
if ( Gate : : d e n i e s ( ’ data−p o i n t ’ , > to avoid e r r o r s . ” ;
$ s u b r e p o r t −>p r o j e c t ) ) { return \ Session : : f l a s h ( ’ warning e ’
abort (403) ; , $flash message ) ;
} }
return false ;
$data points = Subreport : : f i n d ( }
$ s u b r e p o r t −>i d )−>d a t a P o i n t s ;
public function deleteAndCreate ( $ p r o j i d )
$ p r e v i o u s s a m p l e i d = −1; {
foreach ( $ d a t a p o i n t s a s $ d a t a p o i n t ) { $matchThese = [ ’ p r o j i d ’ => $ p r o j i d ,
$sample = DataPoint : : f i n d ( ’ e n g r i d ’ => Auth : : u s e r ( )−>i d ] ;
$ d a t a p o i n t −>i d )−>s a m p l e ; $ p r o j e c t = DB : : t a b l e ( ’
i f ( $ p r e v i o u s s a m p l e i d != $sample p r o j e c t e n g i n e e r s ’ )−>where (
−>i d ) { $matchThese )−>g e t ( ) ;
$ f i l e p a t h = ” images /
s u b r e p o r t s /GSA/ sample− i f ( s i z e o f ( $ p r o j e c t ) == 0 ) {
$sample−>i d . png ” ; r e t u r n view ( ’ e r r o r s . 4 0 3 ’ ) ; ;
if ( file exists ( $file path ) ) { }
i f ( ! unlink ( $ f i l e p a t h ) ) {
$ s t a t u s = ” warning ” ; DataPointController : : destroy ( $proj id )
} ;
else { return DataPointController : : create (
$status = ” success ” ; $proj id ) ;
} }
}
} public function c h e c k P r e r e q u i s i t e s ( $counts
$ p r e v i o u s s a m p l e i d = $sample−>i d ; ) {
$ a r e P r e r e q u i s i t e s O k a y = true ;
$ d a t a p o i n t −>d e l e t e ( ) ; i f ( $ c o u n t s == 0 ) {
} $arePrerequisitesOkay = false ;
}
$ p r o j i d = $ s u b r e p o r t −>p r o j i d ;
$ s u b r e p o r t −>d e l e t e ( ) ; i f ( ! $arePrerequisitesOkay ) {
$ f l a s h m e s s a g e = ”Some
return DataPointController : : p r e r e q u i s i t e s are missing (
recordDeleteActivity ( $proj id ) ; b o r e h o l e s or samples ) . Please
} add them f i r s t i n o r d e r t o
proceed smoothly . ” ;
public function recordDeleteActivity ( \ S e s s i o n : : f l a s h ( ’ warning ’ ,
$proj id ) $flash message ) ;
{ }
$project = Project : : findOrFail ( }
$proj id ) ; }
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e
Activity : : create ([
’ p r o j i d ’ => $ p r o j e c t −>i d ,
’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
Listing 8: DeepController.php
’ a c t i v i t y t y p e ’ => ” G ra i n S i z e <?php
A n a l y s i s i n p r o j e c t <i >
$ p r o j e c t −>p r o j n a m e </i > h a s namespace App\ Http \ C o n t r o l l e r s ;
been d e l e t e d . ”
]) ; use Auth ;
use DB;
$ f l a s h m e s s a g e = ” G r ai n S i z e A n a l y s i s use Input ;
i n p r o j e c t $ p r o j e c t −>p r o j n a m e use Gate ;
h a s been s u c c e s s f u l l y d e l e t e d . ” ; use App\ A c t i v i t y ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s . use App\Deep ;
show ’ , $ p r o j e c t −>i d )−>w i t h ( ’ use App\ P r o j e c t ;
success ’ , $flash message ) ; use App\ Sample ;
} use App\ S h a l l o w ;
use I l l u m i n a t e \ Http \ R e q u e s t ;
p u b l i c f u n c t i o n isUpdated ( $ p r o j i d , use App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ;
$samples , $ d a t a p o i n t s ) { use App\ Http \ R e q u e s t s \Deep\ S t o r e D e e p R e q u e s t ;
// Check i f a new s a m p l e h a s b e e n use App\ Http \ R e q u e s t s \Deep\ UpdateDeepRequest ;
created
$is updated = false ; c l a s s DeepController extends Controller
{
$ s a m p l e s i n d p = $ d a t a p o i n t s −>u n i q u e ( /∗ ∗
’ sample id ’ ) ; ∗ Display a l i s t i n g of the resource .
i f ( s i z e o f ( $ s a m p l e s ) != s i z e o f ( ∗
$samples in dp ) ) { ∗ @return \ I l l u m i n a t e \ Http \ Response
$ i s u p d a t e d = true ; ∗/
} public function index ( $id )
else { {
$ s a m p l e s −>s o r t B y ( ’ i d ’ )−>t o A r r a y ( ) ; $project = Project : : findOrFail ( $id ) ;
$ s a m p l e s i n d p −>s o r t B y ( ’ s a m p l e i d ’
)−>t o A r r a y ( ) ; if ( Gate : : d e n i e s ( ’ i n d e x −deep ’ ,
$i = 0; $project ) ) {
foreach ( $ s a m p l e s i n d p a s abort (403) ;
$sample in dp ) { }
i f ( $ s a m p l e s [ $ i ]−> i d !=
$ s a m p l e i n d p −>s a m p l e i d ) $ b o r e h o l e s = P r o j e c t : : f i n d ( $ p r o j e c t −>
{ i d )−>b o r e h o l e s ;
55
$ s a m p l e s = Sample : : j o i n ( ’ b o r e h o l e s ’ , ’ f o r ( $ i = 0 ; $ i < $ p r o j e c t −>
s a m p l e s . b h i d ’ , ’= ’ , ’ b o r e h o l e s . p r o j n u m o f b o r e h o l e s ; $ i ++) {
id ’ ) while ( $ j < $ r e q u e s t −>
−>where ( ’ b o r e h o l e s . p r o j i d ’ , num of samples [ $ i ] ) {
$ p r o j e c t −>i d ) $ d e e p = Deep : : c r e a t e ( [
−> s e l e c t ( ’ s a m p l e s . i d ’ , ’ s a m p l e s . ’ p r o j i d ’ => $ p r o j e c t −>i d ,
b h i d ’ , ’ s a m p l e s . sample num ’ , ’ b h i d ’ => $ r e q u e s t −>b h i d
’ samples . sample to ’ , ’ [ $i ] ,
samples . sample num of blows ’ ) ’ s a m p l e i d ’ => $ r e q u e s t −>
−>groupBy ( ’ s a m p l e s . i d ’ ) s a m p l e i d [ $k ] ,
−>o r d e r B y ( ’ s a m p l e s . b h i d ’ ) ’ d e e p p i l e s i z e ’ =>
−>o r d e r B y ( ’ s a m p l e s . i d ’ ) $ r e q u e s t −>
−>g e t ( ) ; deep pile size [ $i ] ,
$ s h a l l o w s = S h a l l o w : : where ( ’ p r o j i d ’ , ’ deep K ’ => $ r e q u e s t −>
$ p r o j e c t −>i d )−>g e t ( ) ; deep K [ $ i ] ,
$ d e e p s = Deep : : where ( ’ p r o j i d ’ , ’ deep gamma ’ => $ r e q u e s t −>
$ p r o j e c t −>i d )−>g e t ( ) ; deep gamma [ $ i ] ,
’ d e e p t a n ’ => $ r e q u e s t −>
D e e p C o n t r o l l e r : : i s U p d a t e d ( $ p r o j e c t −>i d deep tan [ $i ] ,
, sizeof ( $samples ) , sizeof ( $deeps ’ d e e p f s ’ => $ r e q u e s t −>
) , sizeof ( $shallows ) ) ; deep fs [ $i ] ,
’ d e e p r h o ’ => $ r e q u e s t −>
r e t u r n v i e w ( ’ d e e p s . i n d e x ’ , array ( ’ deep rho [ $i ] ,
p r o j e c t ’ => $ p r o j e c t , ’ b o r e h o l e s ’ ’ d e e p f y ’ => $ r e q u e s t −>
=> $ b o r e h o l e s , ’ s a m p l e s ’ => deep fy [ $i ] ,
$ s a m p l e s , ’ d e e p s ’ => $ d e e p s ) ) ; ’ d e e p f c ’ => $ r e q u e s t −>
} deep fc [ $i ] ,
’ deep concrete strength kn
/∗ ∗ ’ => $ r e q u e s t −>
∗ Show t h e f o r m f o r c r e a t i n g a new deep concrete strength kn
resource . [ $i ] ,
∗ ’
∗ @return \ I l l u m i n a t e \ Http \ Response deep concrete strength ton
∗/ ’ => $ r e q u e s t −>
public function create ( $id ) deep concrete strength ton
{ [ $i ] ,
$project = Project : : findOrFail ( $id ) ; ’ d e e p f ’ => $ r e q u e s t −>
d e e p f [ $k ] ,
if ( Gate : : d e n i e s ( ’ deep ’ , $project ) ) { ’ d e e p A s u r f a c e ’ =>
abort (403) ; $ r e q u e s t −>
} d e e p A s u r f a c e [ $k ] ,
’ d e e p q ’ => $ r e q u e s t −>
$ d e e p s = $ p r o j e c t −>d e e p s ; d e e p q [ $k ] ,
’ d e e p A t i p ’ => $ r e q u e s t −>
i f ( s i z e o f ( $ d e e p s ) == 0 ) { d e e p A t i p [ $k ] ,
$boreholes = Project : : findOrFail ( ’ d e e p Q t o t a l ’ => $ r e q u e s t
$ p r o j e c t −>i d )−>b o r e h o l e s ; −>d e e p Q t o t a l [ $k ] ,
$ s a m p l e s = Sample : : j o i n ( ’ b o r e h o l e s ’ d e e p Q k n ’ => $ r e q u e s t −>
’ , ’ s a m p l e s . b h i d ’ , ’= ’ , ’ d e e p Q k n [ $k ] ,
boreholes . id ’ ) ’ d e e p Q t o n ’ => $ r e q u e s t −>
−>where ( ’ b o r e h o l e s . p r o j i d ’ , d e e p Q t o n [ $k ]
$ p r o j e c t −>i d ) ]) ;
−> s e l e c t ( ’ s a m p l e s . i d ’ , ’
samples . bh id ’ , ’ samples . $ j ++;
sample num ’ , ’ s a m p l e s . $k++;
sample to ’ ) }
−>g e t ( ) ; $j = 0;
$ s h a l l o w s = S h a l l o w : : where ( ’ }
p r o j i d ’ , $ p r o j e c t −>i d )−>g e t
() ; i f ( ( s i z e o f ( $ r e q u e s t −>d e e p i s c h o s e n ) >
0 ) && ( $ r e q u e s t −>d e e p i s c h o s e n
DeepController : : checkPrerequisites [ 0 ] > −1) ) {
( $samples , $shallows , f o r ( $ i = 0 ; $ i < s i z e o f ( $ r e q u e s t −>
$project ) ; d e e p i s c h o s e n ) ; $ i ++) {
for ( $j = 0 ; $j < sizeof (
r e t u r n v i e w ( ’ d e e p s . c r e a t e ’ , array ( $ r e q u e s t −>s a m p l e i d ) ; $ j
’ p r o j e c t ’ => $ p r o j e c t , ’ ++) {
b o r e h o l e s ’ => $ b o r e h o l e s , ’ i f ( $ r e q u e s t −>
s a m p l e s ’ => $ s a m p l e s , ’ d e e p i s c h o s e n [ $ i ] ==
s h a l l o w s ’ => $ s h a l l o w s ) ) ; $ r e q u e s t −>s a m p l e i d [
} $j ] ) {
else { $ d e e p = Sample : : f i n d (
$ f l a s h m e s s a g e = ”SBC d a t a f o r $ r e q u e s t −>
deep f o u n d a t i o n i n p r o j e c t s a m p l e i d [ $ j ] )−>
$ p r o j e c t −>p r o j n a m e a l r e a d y deep ;
e x i s t s . You c a n n o t c r e a t e $deep−>u p d a t e ( [ ’
another i n s t a n c e o f the data . deep is chosen ’
”; => 1 ] ) ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s }
. show ’ , $ p r o j e c t −>i d )−>w i t h ( ’ }
error ’ , $flash message ) ; }
} }
}
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e
/∗ ∗ Activity : : create ([
∗ Store a newly c r e a t e d resource in ’ p r o j i d ’ => $ p r o j e c t −>i d ,
storage . ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
∗ ’ a c t i v i t y t y p e ’ => ” Data f o r SBC
∗ @param \ I l l u m i n a t e \ Http \ Request f o r deep f o u n d a t i o n i n
$request p r o j e c t <i >$ p r o j e c t −>
∗ @return \ I l l u m i n a t e \ Http \ Response p r o j n a m e </i > h a s been
∗/ created . ”
p u b l i c f u n c t i o n s t o r e ( StoreDeepRequest ]) ;
$request )
{ $ f l a s h m e s s a g e = ” Data f o r SBC f o r
$project = Project : : findOrFail ( deep f o u n d a t i o n i n p r o j e c t
$ r e q u e s t −>p r o j i d ) ; $ p r o j e c t −>p r o j n a m e h a s been
$ j = $k = 0 ; s u c c e s s f u l l y saved . ” ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ d e e p s . i n d e x ’
56
, $ p r o j e c t −>i d )−>w i t h ( ’ s u c c e s s ’ , ’ d e e p f c ’ => $ r e q u e s t −>
$flash message ) ; deep fc [ $i ] ,
} ’ deep concrete strength kn
’ => $ r e q u e s t −>
/∗ ∗ deep concrete strength kn
∗ Display the s p e c i f i e d resource . [ $i ] ,
∗ ’
∗ @param int $id deep concrete strength ton
∗ @return \ I l l u m i n a t e \ Http \ Response ’ => $ r e q u e s t −>
∗/ deep concrete strength ton
p u b l i c f u n c t i o n show ( $ i d ) [ $i ] ,
{ ’ d e e p f ’ => $ r e q u e s t −>
// d e e p f [ $k ] ,
} ’ d e e p A s u r f a c e ’ =>
$ r e q u e s t −>
/∗ ∗ d e e p A s u r f a c e [ $k ] ,
∗ Show t h e f o r m f o r e d i t i n g t h e s p e c i f i e d ’ d e e p q ’ => $ r e q u e s t −>
resource . d e e p q [ $k ] ,
∗ ’ d e e p A t i p ’ => $ r e q u e s t −>
∗ @param int $id d e e p A t i p [ $k ] ,
∗ @return \ I l l u m i n a t e \ Http \ Response ’ d e e p Q t o t a l ’ => $ r e q u e s t
∗/ −>d e e p Q t o t a l [ $k ] ,
public function edit ( $id ) ’ d e e p Q k n ’ => $ r e q u e s t −>
{ d e e p Q k n [ $k ] ,
$project = Project : : findOrFail ( $id ) ; ’ d e e p Q t o n ’ => $ r e q u e s t −>
d e e p Q t o n [ $k ] ,
if ( Gate : : d e n i e s ( ’ deep ’ , $project ) ) { ’ d e e p i s c h o s e n ’ => 0
abort (403) ; ]) ;
}
$ j ++;
$ b o r e h o l e s = P r o j e c t : : f i n d ( $ p r o j e c t −> $k++;
i d )−>b o r e h o l e s ; }
$ s a m p l e s = Sample : : j o i n ( ’ b o r e h o l e s ’ , ’ $j = 0;
s a m p l e s . b h i d ’ , ’= ’ , ’ b o r e h o l e s . }
id ’ )
−>where ( ’ b o r e h o l e s . p r o j i d ’ , i f ( ( s i z e o f ( $ r e q u e s t −>d e e p i s c h o s e n ) >
$ p r o j e c t −>i d ) 0 ) && ( $ r e q u e s t −>d e e p i s c h o s e n
−> s e l e c t ( ’ s a m p l e s . i d ’ , ’ s a m p l e s . [ 0 ] > −1) ) {
b h i d ’ , ’ s a m p l e s . sample num ’ , f o r ( $ i = 0 ; $ i < s i z e o f ( $ r e q u e s t −>
’ samples . sample to ’ , ’ d e e p i s c h o s e n ) ; $ i ++) {
samples . sample num of blows ’ ) for ( $j = 0 ; $j < sizeof (
−>groupBy ( ’ s a m p l e s . i d ’ ) $ r e q u e s t −>s a m p l e i d ) ; $ j
−>o r d e r B y ( ’ s a m p l e s . b h i d ’ ) ++) {
−>o r d e r B y ( ’ s a m p l e s . i d ’ ) i f ( $ r e q u e s t −>
−>g e t ( ) ; d e e p i s c h o s e n [ $ i ] ==
$ s h a l l o w s = S h a l l o w : : where ( ’ p r o j i d ’ , $ r e q u e s t −>s a m p l e i d [
$ p r o j e c t −>i d )−>g e t ( ) ; $j ] ) {
$ d e e p s = Deep : : where ( ’ p r o j i d ’ , $ d e e p = Sample : : f i n d (
$ p r o j e c t −>i d )−>g e t ( ) ; $ r e q u e s t −>
s a m p l e i d [ $ j ] )−>
D e e p C o n t r o l l e r : : i s U p d a t e d ( $ p r o j e c t −>i d deep ;
, sizeof ( $samples ) , sizeof ( $deeps $deep−>u p d a t e ( [ ’
) , sizeof ( $shallows ) ) ; deep is chosen ’
=> 1 ] ) ;
r e t u r n v i e w ( ’ d e e p s . e d i t ’ , array ( ’ }
p r o j e c t ’ => $ p r o j e c t , ’ b o r e h o l e s ’ }
=> $ b o r e h o l e s , ’ s a m p l e s ’ => }
$ s a m p l e s , ’ s h a l l o w s ’ => $ s h a l l o w s }
, ’ d e e p s ’ => $ d e e p s ) ) ;
} // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
Activity : : create ([
/∗ ∗ ’ p r o j i d ’ => $ r e q u e s t −>p r o j i d ,
∗ Update t h e s p e c i f i e d r e s o u r c e i n ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
storage . ’ a c t i v i t y t y p e ’ => ” Data f o r SBC
∗ f o r deep f o u n d a t i o n i n
∗ @param \ I l l u m i n a t e \ Http \ Request p r o j e c t <i >$ p r o j e c t −>
$request p r o j n a m e </i > h a s been
∗ @param int $id modified . ”
∗ @return \ I l l u m i n a t e \ Http \ Response ]) ;
∗/
p u b l i c f u n c t i o n u p d a t e ( UpdateDeepRequest $ f l a s h m e s s a g e = ” Data f o r SBC f o r
$request , $id ) deep f o u n d a t i o n i n p r o j e c t
{ $ p r o j e c t −>p r o j n a m e h a s been
// U p d a t e i n f o r m a t i o n s u c c e s s f u l l y modified . ” ;
$project = Project : : findOrFail ( $id ) ; r e t u r n r e d i r e c t ( )−>r o u t e ( ’ d e e p s . i n d e x ’
$ j = $k = 0 ; , $ p r o j e c t −>i d )−>w i t h ( ’ s u c c e s s ’ ,
f o r ( $ i = 0 ; $ i < $ p r o j e c t −> $flash message ) ;
p r o j n u m o f b o r e h o l e s ; $ i ++) { }
while ( $ j < $ r e q u e s t −>
num of samples [ $ i ] ) { /∗ ∗
$ d e e p = Deep : : f i n d O r F a i l ( ∗ Remove t h e s p e c i f i e d r e s o u r c e f r o m
$ r e q u e s t −>d e e p i d [ $k ] ) ; storage .
∗
$deep−>u p d a t e ( [ ∗ @param int $id
’ d e e p p i l e s i z e ’ => ∗ @return \ I l l u m i n a t e \ Http \ Response
$ r e q u e s t −> ∗/
deep pile size [ $i ] , public function destroy ( $id )
’ deep K ’ => $ r e q u e s t −> {
deep K [ $ i ] , $ d e e p s = P r o j e c t : : f i n d O r F a i l ( $ i d )−>
’ deep gamma ’ => $ r e q u e s t −> deeps ;
deep gamma [ $ i ] ,
’ d e e p t a n ’ => $ r e q u e s t −> if ( Gate : : d e n i e s ( ’ deep ’ , Project : : find
deep tan [ $i ] , ( $id ) ) ) {
’ d e e p f s ’ => $ r e q u e s t −> abort (403) ;
deep fs [ $i ] , }
’ d e e p r h o ’ => $ r e q u e s t −>
deep rho [ $i ] , foreach ( $ d e e p s a s $ d e e p ) {
’ d e e p f y ’ => $ r e q u e s t −> $deep−>d e l e t e ( ) ;
deep fy [ $i ] , }
57
$ a r e T h e r e S h a l l o w s = true ;
return DeepController : : i f ( s i z e o f ( $ s a m p l e s ) == 0 ) {
recordDeleteActivity ( $id ) ; $areThereSamples = f a l s e ;
} }
i f ( s i z e o f ( $ s h a l l o w s ) == 0 ) {
public function recordDeleteActivity ( $areThereShallows = false ;
$proj id ) }
{
$project = Project : : findOrFail ( i f ( ! $areThereSamples ) {
$proj id ) ; $flash message = ” Boreholes /
samples are missing . Please
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e add them f i r s t i n o r d e r t o
Activity : : create ([ proceed smoothly . ” ;
’ p r o j i d ’ => $ p r o j e c t −>i d , \ S e s s i o n : : f l a s h ( ’ warning ’ ,
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , $flash message ) ;
’ a c t i v i t y t y p e ’ => ” Data f o r SBC }
f o r deep f o u n d a t i o n i n i f ( ! $areThereShallows ) {
p r o j e c t <i >$ p r o j e c t −> $route = route ( ’ deeps . c r e a t e ’ ,
p r o j n a m e </i > h a s been $ p r o j e c t −>i d ) ;
deleted . ” $ f l a s h m e s s a g e = ”SBC d a t a f o r
]) ; shallow foundation i s missing
. P l e a s e <a h r e f=$ r o u t e c l a s s
$ f l a s h m e s s a g e = ” Data f o r SBC f o r =’ btn btn−l i n k btn−sm’> c r e a t e
deep f o u n d a t i o n i n p r o j e c t one f i r s t </a> i n o r d e r t o
$ p r o j e c t −>p r o j n a m e h a s been proceed smoothly . ” ;
successfully deleted . ” ; \ Session : : f l a s h ( ’ warning e ’ ,
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s . $flash message ) ;
show ’ , $ p r o j e c t −>i d )−>w i t h ( ’ }
success ’ , $flash message ) ; }
} }
p u b l i c f u n c t i o n isUpdated ( $ p r o j i d ,
$size of samples , $size of deeps ,
$size of shallows ) {
$is updated = false ;
Listing 9: DrilledShaftController.php
<?php
// Check i f d a t a i s n o t y e t c r e a t e d
i f ( $ s i z e o f d e e p s == 0 ) { namespace App\ Http \ C o n t r o l l e r s ;
$route = route ( ’ deeps . c r e a t e ’ ,
$proj id ) ;
$ f l a s h m e s s a g e = ”SBC d a t a f o r use Auth ;
shallow foundation i s missing use DB;
. <a h r e f=$ r o u t e c l a s s =’ btn use Input ;
btn−l i n k btn−sm’>Add one h e r e use Gate ;
</a >. ” ; use App\ A c t i v i t y ;
\ Session : : f l a s h ( ’ warning e ’ , use App\ D r i l l e d S h a f t ;
$flash message ) ; use App\ P r o j e c t ;
return ; use App\ Sample ;
} use I l l u m i n a t e \ Http \ R e q u e s t ;
use App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ;
// Check i f a new s a m p l e h a s b e e n use App\ Http \ R e q u e s t s \ D r i l l e d S h a f t \
created StoreDrilledShaftRequest ;
e l s e i f ( $ s i z e o f s a m p l e s != u s e App\ Http \ R e q u e s t s \ D r i l l e d S h a f t \
$size of deeps ) { UpdateDrilledShaftRequest ;
$ i s u p d a t e d = true ;
} class DrilledShaftController extends
Controller
// Check i f a new i n s t a n c e of shallows {
has been c r e a t e d /∗ ∗
e l s e i f ( $ s i z e o f d e e p s != ∗ Display a l i s t i n g of the resource .
$size of shallows ) { ∗
$ i s u p d a t e d = true ; ∗ @return \ I l l u m i n a t e \ Http \ Response
} ∗/
public function index ( $id )
i f ( $is updated ) { {
$route = route ( ’ deeps . $project = Project : : findOrFail ( $id ) ;
deleteAndCreate ’ , $ p r o j i d ) ;
$ f l a s h m e s s a g e = ” Samples were if ( Gate : : d e n i e s ( ’ i n d e x −d r i l l e d −s h a f t ’
recently modified . Please , $project ) ) {
u p d a t e t h e d a t a by <a h r e f= abort (403) ;
$ r o u t e c l a s s =’ btn btn−l i n k }
btn−sm’> c r e a t i n g a new one </a
> to avoid e r r o r s . ” ; $ b o r e h o l e s = P r o j e c t : : f i n d ( $ p r o j e c t −>
\ Session : : f l a s h ( ’ warning e ’ , i d )−>b o r e h o l e s ;
$flash message ) ; $ s a m p l e s = Sample : : j o i n ( ’ b o r e h o l e s ’ , ’
} s a m p l e s . b h i d ’ , ’= ’ , ’ b o r e h o l e s .
return ; id ’ )
} −>where ( ’ b o r e h o l e s . p r o j i d ’ ,
$ p r o j e c t −>i d )
public function deleteAndCreate ( $ p r o j i d ) −> s e l e c t ( ’ s a m p l e s . i d ’ , ’ s a m p l e s .
{ b h i d ’ , ’ s a m p l e s . sample num ’ ,
$matchThese = [ ’ p r o j i d ’ => $ p r o j i d , ’ samples . sample to ’ , ’
’ e n g r i d ’ => Auth : : u s e r ( )−>i d ] ; samples . sample num of blows ’ )
$ p r o j e c t = DB : : t a b l e ( ’ −>groupBy ( ’ s a m p l e s . i d ’ )
p r o j e c t e n g i n e e r s ’ )−>where ( −>o r d e r B y ( ’ s a m p l e s . b h i d ’ )
$matchThese )−>g e t ( ) ; −>o r d e r B y ( ’ s a m p l e s . i d ’ )
−>g e t ( ) ;
i f ( s i z e o f ( $ p r o j e c t ) == 0 ) { $ d r i l l e d s h a f t s = D r i l l e d S h a f t : : where (
r e t u r n view ( ’ e r r o r s . 4 0 3 ’ ) ; ; ’ p r o j i d ’ , $ i d )−>g e t ( ) ;
}
D r i l l e d S h a f t C o n t r o l l e r : : isUpdated (
DeepController : : destroy ( $proj id ) ; $ p r o j e c t −>i d , s i z e o f ( $ s a m p l e s ) ,
return DeepController : : create ( $proj id sizeof ( $ d r i l l e d s h a f t s ) ) ;
);
} r e t u r n view ( ’ d r i l l e d s h a f t s . index ’ ,
array ( ’ p r o j e c t ’ => $ p r o j e c t , ’
public function checkPrerequisites ( b o r e h o l e s ’ => $ b o r e h o l e s , ’
$samples , $shallows , $ p r o j e c t ) { s a m p l e s ’ => $ s a m p l e s , ’
$ a r e T h e r e S a m p l e s = true ; d r i l l e d s h a f t s ’ =>
58
$drilled shafts )) ; [ $i ] ,
} ’ d s t e n s i o n c a p ’ =>
$ r e q u e s t −>
/∗ ∗ ds tension cap [ $i ] ,
∗ Show t h e f o r m f o r c r e a t i n g a new ’ ds concrete strength kn ’
resource . => $ r e q u e s t −>
∗ ds concrete strength kn
∗ @return \ I l l u m i n a t e \ Http \ Response [ $i ] ,
∗/ ’ ds concrete strength ton ’
public function create ( $id ) => $ r e q u e s t −>
{ ds concrete strength ton
$project = Project : : findOrFail ( $id ) ; [ $i ] ,
’ d s s o i l ’ => $ r e q u e s t −>
if ( Gate : : d e n i e s ( ’ d r i l l e d −s h a f t ’ , d s s o i l [ $k ] ,
$project ) ) { ’ d s c ’ => $ r e q u e s t −>d s c [
abort (403) ; $k ] ,
} ’ d s Q b a s e ’ => $ r e q u e s t −>
d s Q b a s e [ $k ] ,
$ d r i l l e d s h a f t s = $ p r o j e c t −> ’ d s f ’ => $ r e q u e s t −>d s f [
drilledShafts ; $k ] ,
’ d s Q f r i c t i o n ’ => $ r e q u e s t
i f ( s i z e o f ( $ d r i l l e d s h a f t s ) == 0 ) { −>d s Q f r i c t i o n [ $k ] ,
$boreholes = Project : : findOrFail ( ’ d s Q t o t a l k n ’ => $ r e q u e s t
$ p r o j e c t −>i d )−>b o r e h o l e s ; −>d s Q t o t a l k n [ $k ] ,
$ s a m p l e s = Sample : : j o i n ( ’ b o r e h o l e s ’ d s Q t o t a l t o n ’ =>
’ , ’ s a m p l e s . b h i d ’ , ’= ’ , ’ $ r e q u e s t −>
boreholes . id ’ ) d s Q t o t a l t o n [ $k ] ,
−>where ( ’ b o r e h o l e s . p r o j i d ’ , ]) ;
$ p r o j e c t −>i d )
−> s e l e c t ( ’ s a m p l e s . i d ’ , ’ $ j ++;
samples . bh id ’ , ’ samples . $k++;
sample num ’ , ’ s a m p l e s . }
sample to ’ , ’ samples . $j = 0;
sample num of blows ’ ) }
−>g e t ( ) ;
i f ( ( s i z e o f ( $ r e q u e s t −>d s i s c h o s e n ) >
DrilledShaftController : : 0 ) && ( $ r e q u e s t −>d s i s c h o s e n [ 0 ]
checkPrerequisites ( $boreholes > −1) ) {
, $samples ) ; f o r ( $ i = 0 ; $ i < s i z e o f ( $ r e q u e s t −>
d s i s c h o s e n ) ; $ i ++) {
r e t u r n view ( ’ d r i l l e d s h a f t s . c r e a t e ’ for ( $j = 0 ; $j < sizeof (
, array ( ’ p r o j e c t ’ => $ p r o j e c t $ r e q u e s t −>s a m p l e i d ) ; $ j
, ’ b o r e h o l e s ’ => $ b o r e h o l e s , ++) {
’ s a m p l e s ’ => $ s a m p l e s ) ) ; i f ( $ r e q u e s t −>d s i s c h o s e n [
$ i ] == $ r e q u e s t −>
} sample id [ $j ] ) {
else { $drilled shaft =
$ f l a s h m e s s a g e = ”SBC d a t a f o r Sample : : f i n d (
d r i l l e d shaft foundation in $ r e q u e s t −>
p r o j e c t $ p r o j e c t −>p r o j n a m e s a m p l e i d [ $ j ] )−>
a l r e a d y e x i s t s . You c a n n o t drilledShaft ;
create another instance of $ d r i l l e d s h a f t −>u p d a t e
the data . ” ; ([ ’ ds is chosen ’
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s => 1 ] ) ;
. show ’ , $ p r o j e c t −>i d )−>w i t h ( ’ }
error ’ , $flash message ) ; }
} }
} }
/∗ ∗ // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
∗ Store a newly c r e a t e d resource in Activity : : create ([
storage . ’ p r o j i d ’ => $ p r o j e c t −>i d ,
∗ ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
∗ @param \ I l l u m i n a t e \ Http \ Request ’ a c t i v i t y t y p e ’ => ” Data f o r SBC
$request for d r i l l e d shaft foundation
∗ @return \ I l l u m i n a t e \ Http \ Response i n p r o j e c t <i >$ p r o j e c t −>
∗/ p r o j n a m e </i > h a s been
public function store ( created . ”
StoreDrilledShaftRequest $request ) ]) ;
{
$project = Project : : findOrFail ( $ f l a s h m e s s a g e = ” Data f o r SBC f o r
$ r e q u e s t −>p r o j i d ) ; d r i l l e d shaft foundation in
$ j = $k = 0 ; p r o j e c t $ p r o j e c t −>p r o j n a m e h a s
been s u c c e s s f u l l y s a v e d . ” ;
f o r ( $ i = 0 ; $ i < $ p r o j e c t −> r e t u r n r e d i r e c t ( )−>r o u t e ( ’
p r o j n u m o f b o r e h o l e s ; $ i ++) { d r i l l e d s h a f t s . i n d e x ’ , $ p r o j e c t −>
while ( $ j < $ r e q u e s t −> i d )−>w i t h ( ’ s u c c e s s ’ ,
num of samples [ $ i ] ) { $flash message ) ;
DrilledShaft : : create ([ }
’ p r o j i d ’ => $ p r o j e c t −>i d ,
’ b h i d ’ => $ r e q u e s t −>b h i d /∗ ∗
[ $i ] , ∗ Display the s p e c i f i e d resource .
’ s a m p l e i d ’ => $ r e q u e s t −> ∗
s a m p l e i d [ $k ] , ∗ @param int $id
’ d s p i l e s i z e ’ => $ r e q u e s t ∗ @return \ I l l u m i n a t e \ Http \ Response
−> d s p i l e s i z e [ $ i ] , ∗/
’ d s N c ’ => $ r e q u e s t −>d s N c p u b l i c f u n c t i o n show ( $ i d )
[ $i ] , {
’ d s f c o e f f ’ => $ r e q u e s t −> //
d s f c o e f f [ $i ] , }
’ d s f c ’ => $ r e q u e s t −>d s f c
[ $i ] , /∗ ∗
’ d s f y ’ => $ r e q u e s t −>d s f y ∗ Show t h e f o r m f o r e d i t i n g t h e s p e c i f i e d
[ $i ] , resource .
’ d s s t e e l b a r d i a m e t e r ’ => ∗
$ r e q u e s t −> ∗ @param int $id
ds steel bar diameter ∗ @return \ I l l u m i n a t e \ Http \ Response
[ $i ] , ∗/
’ d s f s ’ => $ r e q u e s t −>d s f s public function edit ( $id )
59
{ −>d s Q f r i c t i o n [ $k ] ,
$project = Project : : findOrFail ( $id ) ; ’ d s Q t o t a l k n ’ => $ r e q u e s t
−>d s Q t o t a l k n [ $k ] ,
if ( Gate : : d e n i e s ( ’ d r i l l e d −s h a f t ’ , ’ d s Q t o t a l t o n ’ =>
$project ) ) { $ r e q u e s t −>
abort (403) ; d s Q t o t a l t o n [ $k ] ,
} ’ d s i s c h o s e n ’ => 0
]) ;
$boreholes = Project : : findOrFail (
$ p r o j e c t −>i d )−>b o r e h o l e s ; $ j ++;
$ s a m p l e s = Sample : : j o i n ( ’ b o r e h o l e s ’ , ’ $k++;
s a m p l e s . b h i d ’ , ’= ’ , ’ b o r e h o l e s . }
id ’ ) $j = 0;
−>where ( ’ b o r e h o l e s . p r o j i d ’ , }
$ p r o j e c t −>i d )
−> s e l e c t ( ’ s a m p l e s . i d ’ , ’ s a m p l e s . i f ( ( s i z e o f ( $ r e q u e s t −>d s i s c h o s e n ) >
b h i d ’ , ’ s a m p l e s . sample num ’ , 0 ) && ( $ r e q u e s t −>d s i s c h o s e n [ 0 ]
’ samples . sample to ’ , ’ > −1) ) {
samples . sample num of blows ’ ) f o r ( $ i = 0 ; $ i < s i z e o f ( $ r e q u e s t −>
−>groupBy ( ’ s a m p l e s . i d ’ ) d s i s c h o s e n ) ; $ i ++) {
−>o r d e r B y ( ’ s a m p l e s . b h i d ’ ) for ( $j = 0 ; $j < sizeof (
−>o r d e r B y ( ’ s a m p l e s . i d ’ ) $ r e q u e s t −>s a m p l e i d ) ; $ j
−>g e t ( ) ; ++) {
$ d r i l l e d s h a f t s = D r i l l e d S h a f t : : where ( i f ( $ r e q u e s t −>d s i s c h o s e n [
’ p r o j i d ’ , $ i d )−>g e t ( ) ; $ i ] == $ r e q u e s t −>
sample id [ $j ] ) {
D r i l l e d S h a f t C o n t r o l l e r : : isUpdated ( $drilled shaft =
$ p r o j e c t −>i d , s i z e o f ( $ s a m p l e s ) , Sample : : f i n d (
sizeof ( $ d r i l l e d s h a f t s ) ) ; $ r e q u e s t −>
s a m p l e i d [ $ j ] )−>
r e t u r n view ( ’ d r i l l e d s h a f t s . e d i t ’ , drilledShaft ;
array ( ’ p r o j e c t ’ => $ p r o j e c t , ’ $ d r i l l e d s h a f t −>u p d a t e
b o r e h o l e s ’ => $ b o r e h o l e s , ’ ([ ’ ds is chosen ’
s a m p l e s ’ => $ s a m p l e s , ’ => 1 ] ) ;
d r i l l e d s h a f t s ’ => }
$drilled shafts )) ; }
} }
}
/∗ ∗
∗ Update t h e s p e c i f i e d r e s o u r c e i n // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
storage . Activity : : create ([
∗ ’ p r o j i d ’ => $ r e q u e s t −>p r o j i d ,
∗ @param \ I l l u m i n a t e \ Http \ Request ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
$request ’ a c t i v i t y t y p e ’ => ” Data f o r SBC
∗ @param int $id for d r i l l e d shaft foundation
∗ @return \ I l l u m i n a t e \ Http \ Response i n p r o j e c t <i >$ p r o j e c t −>
∗/ p r o j n a m e </i > h a s been
p u b l i c f u n c t i o n update ( modified . ”
UpdateDrilledShaftRequest $request , ]) ;
$id )
{ $ f l a s h m e s s a g e = ” Data f o r SBC f o r
// U p d a t e i n f o r m a t i o n d r i l l e d shaft foundation in
$project = Project : : findOrFail ( $id ) ; p r o j e c t $ p r o j e c t −>p r o j n a m e h a s
$ j = $k = 0 ; been s u c c e s s f u l l y m o d i f i e d . ” ;
f o r ( $ i = 0 ; $ i < $ p r o j e c t −> r e t u r n r e d i r e c t ( )−>r o u t e ( ’
p r o j n u m o f b o r e h o l e s ; $ i ++) { d r i l l e d s h a f t s . i n d e x ’ , $ p r o j e c t −>
while ( $ j < $ r e q u e s t −> i d )−>w i t h ( ’ s u c c e s s ’ ,
num of samples [ $ i ] ) { $flash message ) ;
$drilled shaft = DrilledShaft }
: : f i n d O r F a i l ( $ r e q u e s t −>
d r i l l e d i d [ $k ] ) ; /∗ ∗
∗ Remove t h e s p e c i f i e d r e s o u r c e f r o m
$ d r i l l e d s h a f t −>u p d a t e ( [ storage .
’ d s p i l e s i z e ’ => $ r e q u e s t ∗
−> d s p i l e s i z e [ $ i ] , ∗ @param int $id
’ d s N c ’ => $ r e q u e s t −>d s N c ∗ @return \ I l l u m i n a t e \ Http \ Response
[ $i ] , ∗/
’ d s f c o e f f ’ => $ r e q u e s t −> public function destroy ( $id )
d s f c o e f f [ $i ] , {
’ d s f c ’ => $ r e q u e s t −>d s f c $ d r i l l e d s h a f t s = Project : : findOrFail (
[ $i ] , $ i d )−> d r i l l e d S h a f t s ;
’ d s f y ’ => $ r e q u e s t −>d s f y
[ $i ] , if ( Gate : : d e n i e s ( ’ d r i l l e d −s h a f t ’ ,
’ d s s t e e l b a r d i a m e t e r ’ => Project : : find ( $id ) ) ) {
$ r e q u e s t −> abort (403) ;
ds steel bar diameter }
[ $i ] ,
’ d s f s ’ => $ r e q u e s t −>d s f s foreach ( $ d r i l l e d s h a f t s a s
[ $i ] , $drilled shaft ) {
’ d s t e n s i o n c a p ’ => $ d r i l l e d s h a f t −>d e l e t e ( ) ;
$ r e q u e s t −> }
ds tension cap [ $i ] ,
’ ds concrete strength kn ’ return DrilledShaftController : :
=> $ r e q u e s t −> recordDeleteActivity ( $id ) ;
ds concrete strength kn }
[ $i ] ,
’ ds concrete strength ton ’ public function recordDeleteActivity (
=> $ r e q u e s t −> $proj id )
ds concrete strength ton {
[ $i ] , $project = Project : : findOrFail (
’ d s s o i l ’ => $ r e q u e s t −> $proj id ) ;
d s s o i l [ $k ] ,
’ d s c ’ => $ r e q u e s t −>d s c [ // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
$k ] , Activity : : create ([
’ d s Q b a s e ’ => $ r e q u e s t −> ’ p r o j i d ’ => $ p r o j e c t −>i d ,
d s Q b a s e [ $k ] , ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
’ d s f ’ => $ r e q u e s t −>d s f [ ’ a c t i v i t y t y p e ’ => ” Data f o r SBC
$k ] , for d r i l l e d shaft foundation
’ d s Q f r i c t i o n ’ => $ r e q u e s t i n p r o j e c t <i >$ p r o j e c t −>
60
p r o j n a m e </i > h a s been
deleted . ” namespace App\ Http \ C o n t r o l l e r s ;
]) ;
use Auth ;
$ f l a s h m e s s a g e = ” Data f o r SBC f o r use Gate ;
d r i l l e d shaft foundation in use Mail ;
p r o j e c t $ p r o j e c t −>p r o j n a m e h a s use App\ A c t i v i t y ;
been s u c c e s s f u l l y d e l e t e d . ” ; use App\ P r o j e c t ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s . use I l l u m i n a t e \ Http \ R e q u e s t ;
show ’ , $ p r o j e c t −>i d )−>w i t h ( ’ use App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ;
success ’ , $flash message ) ; use App\ Http \ R e q u e s t s \ Email \ E m a i l R e q u e s t ;
}
class EmailController extends Controller
p u b l i c f u n c t i o n isUpdated ( $ p r o j i d , {
$size of samples ,
$size of drilled shafts ) { /∗ ∗
$is updated = false ; ∗ Show t h e f o r m f o r c r e a t i n g a new
resource .
// Check i f d a t a i s n o t y e t c r e a t e d ∗
i f ( $ s i z e o f d r i l l e d s h a f t s == 0 ) { ∗ @return \ I l l u m i n a t e \ Http \ Response
$route = route ( ’ d r i l l e d s h a f t s . ∗/
create ’ , $proj id ) ; public function create ( $id )
$ f l a s h m e s s a g e = ”SBC d a t a f o r {
d r i l l e d shaft foundation i s $project = Project : : findOrFail ( $id ) ;
m i s s i n g . <a h r e f=$ r o u t e c l a s s
=’ btn btn−l i n k btn−sm’>Add if ( Gate : : d e n i e s ( ’ e m a i l ’ , $project ) ) {
one h e r e </a >. ” ; abort (403) ;
\ Session : : f l a s h ( ’ warning e ’ , }
$flash message ) ;
return ; r e t u r n v i e w ( ’ e m a i l s . c r e a t e ’ , array ( ’
} p r o j e c t ’ => $ p r o j e c t ) ) ;
}
// Check i f a new s a m p l e h a s b e e n
created /∗ ∗
e l s e i f ( $ s i z e o f s a m p l e s != ∗ Send e m a i l .
$size of drilled shafts ) { ∗
$ i s u p d a t e d = true ; ∗ @param \ I l l u m i n a t e \ Http \ Request
} $request
∗ @return \ I l l u m i n a t e \ Http \ Response
i f ( $is updated ) { ∗/
$route = route ( ’ d r i l l e d s h a f t s . p u b l i c f u n c t i o n send ( EmailRequest $ r e q u e s t
deleteAndCreate ’ , $ p r o j i d ) ; )
$ f l a s h m e s s a g e = ” Samples were {
recently modified . Please $project = Project : : findOrFail (
u p d a t e t h e d a t a by <a h r e f= $ r e q u e s t −>p r o j i d ) ;
$ r o u t e c l a s s =’ btn btn−l i n k
btn−sm’> c r e a t i n g a new one </a if ( Gate : : d e n i e s ( ’ e m a i l ’ , $project ) ) {
> to avoid e r r o r s . ” ; abort (403) ;
\ Session : : f l a s h ( ’ warning e ’ , }
$flash message ) ;
} $ u s e r n a m e = Auth : : u s e r ( )−>f i r s t n a m e .
return ; ’ ’ . Auth : : u s e r ( )−>l a s t n a m e ;
} $ t o = $ r e q u e s t −>t o ;
$ s u b j e c t = $ r e q u e s t −>s u b j e c t ;
public function deleteAndCreate ( $ p r o j i d ) $body = $ r e q u e s t −>m e s s a g e ;
{ $ f i l e p a t h = $ r e q u e s t −>f i l e p a t h ;
$matchThese = [ ’ p r o j i d ’ => $ p r o j i d ,
’ e n g r i d ’ => Auth : : u s e r ( )−>i d ] ; Mail : : send ( ’ e m a i l s . send ’ ,
$ p r o j e c t = DB : : t a b l e ( ’ [ ’ body ’ => $body ,
p r o j e c t e n g i n e e r s ’ )−>where ( ’ u s e r n a m e ’ => $ u s e r n a m e ] ,
$matchThese )−>g e t ( ) ; f u n c t i o n ($m) u s e ( $to ,
$user name , $ s u b j e c t ,
i f ( s i z e o f ( $ p r o j e c t ) == 0 ) { $file path ) {
r e t u r n view ( ’ e r r o r s . 4 0 3 ’ ) ; ; $m−>t o ( $ t o )
} −>s u b j e c t ( $ s u b j e c t )
−>a t t a c h ( $ f i l e p a t h
DrilledShaftController : : destroy ( );
$proj id ) ; }) ;
return DrilledShaftController : : create (
$proj id ) ; // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
} Activity : : create ([
’ p r o j i d ’ => $ p r o j e c t −>i d ,
public function checkPrerequisites ( ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
$boreholes , $samples ) { ’ a c t i v i t y t y p e ’ => ” G e o t e c h n i c a l
$ a r e P r e r e q u i s i t e s O k a y = true ; i n v e s t i g a t i o n r e p o r t f o r <i >
i f ( s i z e o f ( $ b o r e h o l e s ) == 0 ) { $ p r o j e c t −>p r o j n a m e </i > h a s
$arePrerequisitesOkay = false ; been s e n t t o $ t o . ”
} ]) ;
i f ( s i z e o f ( $ s a m p l e s ) == 0 ) {
$arePrerequisitesOkay = false ; $ f l a s h m e s s a g e = ”The e m a i l h a s been
} s u c c e s s f u l l y sent to $to . ” ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s .
i f ( ! $arePrerequisitesOkay ) { show ’ , $ p r o j e c t −>i d )−>w i t h ( ’
$ f l a s h m e s s a g e = ”Some success ’ , $flash message ) ;
p r e r e q u i s i t e s are missing ( }
b o r e h o l e s or samples ) . Please }
add them f i r s t i n o r d e r t o
proceed smoothly . ” ;
\ S e s s i o n : : f l a s h ( ’ warning ’ ,
}
$flash message ) ;
Listing 11: LimitController.php
} <?php
}
namespace App\ Http \ C o n t r o l l e r s ;
use Auth ;
Listing 10: EmailController.php use DB;
use Input ;
<?php use Gate ;
61
use App\ A c t i v i t y ;
use App\ L i m i t ; $boreholes [ $i ] = $borehole
use App\ P r o j e c t ; −>i d ;
use App\ Sample ; $j = 0;
use App\ S u b r e p o r t ;
use I l l u m i n a t e \ Http \ R e q u e s t ; i f ( sizeof ( $samples ) > 0) {
use App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ; // I f t h e r e a r e
samples in current
c l a s s LimitController extends Controller borehole
{ foreach ( $ s a m p l e s a s
/∗ ∗ $sample ) {
∗ Display a l i s t i n g of the resource . $counts [ $i ] [ $j ] =
∗ $sample−>i d ;
∗ @return \ I l l u m i n a t e \ Http \ Response $ j ++;
∗/ }
public function index ( $id ) }
{ $ i ++;
$project = Project : : findOrFail ( $id ) ; }
}
if ( Gate : : d e n i e s ( ’ i n d e x −l i m i t ’ , else {
$project ) ) { $counts = 0;
abort (403) ; }
}
i f ( ! isset ( $counts ) ) {
$boreholes = Project : : findOrFail ( $counts = 0;
$ p r o j e c t −>i d )−>b o r e h o l e s ; }
$ s a m p l e s = Sample : : j o i n ( ’ b o r e h o l e s ’ , ’
s a m p l e s . b h i d ’ , ’= ’ , ’ b o r e h o l e s . LimitController : :
id ’ ) c h e c k P r e r e q u i s i t e s ( $counts ) ;
−>where ( ’ b o r e h o l e s . p r o j i d ’ ,
$ p r o j e c t −>i d ) r e t u r n v i e w ( ’ l i m i t s . c r e a t e ’ , array
−> s e l e c t ( ’ s a m p l e s . i d ’ , ’ s a m p l e s . ( ’ p r o j e c t ’ => $ p r o j e c t , ’
b h i d ’ , ’ s a m p l e s . sample num ’ ) b o r e h o l e s ’ => $ b o r e h o l e s , ’
−>g e t ( ) ; c o u n t s ’ => $ c o u n t s ) ) ;
}
$matchThese = [ ’ p r o j i d ’ => $ p r o j e c t −> else {
i d , ’ s b k e y ’ => 1 ] ; $ f l a s h m e s s a g e = ” L i q u i d and
$ s u b r e p o r t = S u b r e p o r t : : where ( P l a s t i c L i m i t s Test Report i n
$matchThese )−> f i r s t ( ) ; p r o j e c t $ p r o j e c t −>p r o j n a m e
a l r e a d y e x i s t s . You c a n n o t
$ l i m i t s = L i m i t : : where ( ’ s u b r e p o r t i d ’ , create another instance of
$ s u b r e p o r t −>i d )−>g e t ( ) ; the subreport . ” ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s
r e t u r n v i e w ( ’ l i m i t s . i n d e x ’ , array ( ’ . show ’ , $ p r o j e c t −>i d )−>w i t h ( ’
p r o j e c t ’ => $ p r o j e c t , ’ b o r e h o l e s ’ error ’ , $flash message ) ;
=> $ b o r e h o l e s , ’ s a m p l e s ’ => }
$ s a m p l e s , ’ s u b r e p o r t ’ => }
$ s u b r e p o r t , ’ l i m i t s ’ => $ l i m i t s ) )
; /∗ ∗
} ∗ Store a newly c r e a t e d resource in
storage .
/∗ ∗ ∗
∗ Show t h e f o r m f o r c r e a t i n g a new ∗ @param \ I l l u m i n a t e \ Http \ Request
resource . $request
∗ ∗ @return \ I l l u m i n a t e \ Http \ Response
∗ @return \ I l l u m i n a t e \ Http \ Response ∗/
∗/ p u b l i c f u n c t i o n s t o r e ( Request $ r e q u e s t )
public function create ( $id ) {
{ // V a l i d a t e t h e r e q u e s t
$project = Project : : findOrFail ( $id ) ; $ t h i s −>v a l i d a t e ( $ r e q u e s t , [
’ p r o j i d ’ => ’ r e q u i r e d ’ ,
if ( Gate : : d e n i e s ( ’ l i m i t ’ , $project ) ) { ’ s a m p l e i d ’ => ’ r e q u i r e d | a r r a y ’ ,
abort (403) ; ’ l i m t e s t ’ => ’ r e q u i r e d | a r r a y ’ ,
} ’ l i m w a t e r c o n t e n t ’ => ’ r e q u i r e d |
array ’ ,
// Check i f s u b r e p o r t i s a l r e a d y i n ’ l i m n u m o f b l o w s ’ => ’ r e q u i r e d |
the database array ’
$matchThese = [ ’ p r o j i d ’ => $ p r o j e c t −> ]) ;
i d , ’ s b k e y ’ => 1 ] ;
$match = DB : : t a b l e ( ’ s u b r e p o r t s ’ )−> $project = Project : : findOrFail (
where ( $matchThese )−> f i r s t ( ) ; $ r e q u e s t −>p r o j i d ) ;
i f ( i s n u l l ( $match ) ) { // Check i f s u b r e p o r t i s a l r e a d y i n
$ b o r e h o l e s = DB : : t a b l e ( ’ boreholes ’ the database
) $matchThese = [ ’ p r o j i d ’ => $ p r o j e c t −>
−>j o i n ( ’ p r o j e c t s ’ , ’ boreholes . i d , ’ s b k e y ’ => 1 ] ;
p r o j i d ’ , ’= ’ , ’ projects . $match = DB : : t a b l e ( ’ s u b r e p o r t s ’ )−>
id ’ ) where ( $matchThese )−> f i r s t ( ) ;
−>where ( ’ b o r e h o l e s . proj id ’ ,
$id ) i f ( i s n u l l ( $match ) ) {
−> s e l e c t ( ’ b o r e h o l e s . id ’ ) // S t o r e d a t a t o s u b r e p o r t s t a b l e
−>g e t ( ) ; $input sb [ ’ sb key ’ ] = 1;
$ i n p u t s b [ ’ p r o j i d ’ ] = $ p r o j e c t −>
if ( s i z e o f ( $ b o r e h o l e s ) > 0 ) { // id ;
I f th er e are b o r e h o l e s in $subreport = Subreport : : c r e a t e (
project $input sb ) ;
$i = 0;
foreach ( $ b o r e h o l e s a s // S t o r e d a t a t o l i m i t s t a b l e
$borehole ) { $j = 0;
$ s a m p l e s = DB : : t a b l e ( ’ $lim run num = 0 ;
samples ’ ) $prev test = 0;
−>j o i n ( ’ b o r e h o l e s ’ , ’ f o r ( $ i = 0 ; $ i < s i z e o f ( $ r e q u e s t −>
samples . bh id ’ , ’ s a m p l e i d ) ; $ i ++) {
=’ , ’ boreholes . id
’) ( $ p r e v t e s t == $ r e q u e s t −>
−>where ( ’ s a m p l e s . b h i d lim test [ $i ]) ?
’ , $ b o r e h o l e −>i d ) $ l i m r u n n u m++ :
−> s e l e c t ( ’ s a m p l e s . i d ’ ) $lim run num = 1 ;
−>g e t ( ) ; i f ( $ r e q u e s t −>l i m t e s t [ $ i ] ==
62
1) { $ p r o j e c t −>i d )
$ l i m n u m o f b l o w s = −1; −> s e l e c t ( ’ s a m p l e s . i d ’ , ’ s a m p l e s .
} b h i d ’ , ’ s a m p l e s . sample num ’ )
else { −>g e t ( ) ;
$lim num of blows =
$ r e q u e s t −> $matchThese = [ ’ p r o j i d ’ => $ p r o j e c t −>
lim num of blows [ $j ] ; i d , ’ s b k e y ’ => 1 ] ;
$ j ++; $ s u b r e p o r t = S u b r e p o r t : : where (
} $matchThese )−> f i r s t ( ) ;
Limit : : c r e a t e ( [ $ l i m i t s = L i m i t : : where ( ’ s u b r e p o r t i d ’ ,
’ s a m p l e i d ’ => $ r e q u e s t −> $ s u b r e p o r t −>i d )−>g e t ( ) ;
sample id [ $i ] ,
’ s u b r e p o r t i d ’ => r e t u r n v i e w ( ’ l i m i t s . e d i t ’ , array ( ’
$ s u b r e p o r t −>i d , p r o j e c t ’ => $ p r o j e c t , ’ b o r e h o l e s ’
’ l i m r u n n u m ’ => => $ b o r e h o l e s , ’ s a m p l e s ’ =>
$lim run num , $ s a m p l e s , ’ s u b r e p o r t ’ =>
’ l i m t e s t ’ => $ r e q u e s t −> $ s u b r e p o r t , ’ l i m i t s ’ => $ l i m i t s ) )
lim test [ $i ] , ;
’ l i m n u m o f b l o w s ’ => }
$lim num of blows ,
’ l i m w a t e r c o n t e n t ’ => /∗ ∗
$ r e q u e s t −> ∗ Update t h e s p e c i f i e d r e s o u r c e i n
lim water content [ $i ] storage .
]) ; ∗
∗ @param \ I l l u m i n a t e \ Http \ Request
$ p r e v t e s t = $ r e q u e s t −> $request
lim test [ $i ] ; ∗ @param int $id
} ∗ @return \ I l l u m i n a t e \ Http \ Response
∗/
// Add t h e a c t i v i t y t o a c t i v i t y p u b l i c f u n c t i o n update ( Request $ r e q u e s t ,
table $id )
Activity : : create ([ {
’ p r o j i d ’ => $ p r o j e c t −>i d , // V a l i d a t e t h e r e q u e s t
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , $ t h i s −>v a l i d a t e ( $ r e q u e s t , [
’ a c t i v i t y t y p e ’ => ” Data f o r ’ l i m i t i d ’ => ’ r e q u i r e d | a r r a y ’ ,
t h e L i q u i d s and P l a s t i c ’ s a m p l e i d ’ => ’ r e q u i r e d | a r r a y ’ ,
L i m i t s Test Report i n ’ l i m t e s t ’ => ’ r e q u i r e d | a r r a y ’ ,
p r o j e c t <i >$ p r o j e c t −> ’ l i m w a t e r c o n t e n t ’ => ’ r e q u i r e d |
p r o j n a m e </i > h a s been array ’ ,
created . ” ’ l i m n u m o f b l o w s ’ => ’ r e q u i r e d |
]) ; array ’ ,
’ p r o j i d ’ => ’ r e q u i r e d ’ ,
$ f l a s h m e s s a g e = ” Data f o r t h e ]) ;
L i q u i d s and P l a s t i c L i m i t s
Test Report i n p r o j e c t // U p d a t e d a t a i n d a t a p o i n t s t a b l e
$ p r o j e c t −>p r o j n a m e h a s been f o r ( $ i = 0 ; $ i < s i z e o f ( $ r e q u e s t −>
successful ly created . ” ; l i m i t i d ) ; $ i ++) {
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ $ l i m i t = Limit : : findOrFai l (
s u b r e p o r t s . showLPTR ’ , $ r e q u e s t −>l i m i t i d [ $ i ] ) ;
$ s u b r e p o r t −>i d )−>w i t h ( ’
success ’ , $flash message ) ; $ l i m i t −>u p d a t e ( [
’ l i m w a t e r c o n t e n t ’ =>
} $ r e q u e s t −>
else { lim water content [ $i ] ,
$ f l a s h m e s s a g e = ” L i q u i d s and ’ l i m n u m o f b l o w s ’ => $ r e q u e s t
P l a s t i c L i m i t s Test Report i n −>l i m n u m o f b l o w s [ $ i ]
p r o j e c t $ p r o j e c t −>p r o j n a m e ]) ;
a l r e a d y e x i s t s . You c a n n o t }
create another instance of
the subreport . ” ; $project = Project : : findOrFail (
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ l i m i t s . $ r e q u e s t −>p r o j i d ) ;
c r e a t e ’ , $ p r o j e c t −>i d )−>w i t h ( // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
’ error ’ , $flash message ) ; Activity : : create ([
} ’ p r o j i d ’ => $ p r o j e c t −>i d ,
} ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
’ a c t i v i t y t y p e ’ => ” Data f o r t h e
/∗ ∗ L i q u i d and P l a s t i c L i m i t s
∗ Display the s p e c i f i e d resource . T e s t R e p o r t i n p r o j e c t <i >
∗ $ p r o j e c t −>p r o j n a m e </i > h a s
∗ @param int $id been m o d i f i e d . ”
∗ @return \ I l l u m i n a t e \ Http \ Response ]) ;
∗/
p u b l i c f u n c t i o n show ( $ i d ) $ f l a s h m e s s a g e = ” Data f o r t h e L i q u i d
{ and P l a s t i c L i m i t s T e s t R e p o r t i n
// p r o j e c t $ p r o j e c t −>p r o j n a m e h a s
} been s u c c e s s f u l l y m o d i f i e d . ” ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ s u b r e p o r t s .
/∗ ∗ showLPTR ’ , $ i d )−>w i t h ( ’ s u c c e s s ’ ,
∗ Show t h e f o r m f o r e d i t i n g t h e s p e c i f i e d $flash message ) ;
resource . }
∗
∗ @param int $id /∗ ∗
∗ @return \ I l l u m i n a t e \ Http \ Response ∗ Remove t h e s p e c i f i e d r e s o u r c e f r o m
∗/ storage .
public function edit ( $id ) ∗
{ ∗ @param int $id
$project = Project : : findOrFail ( $id ) ; ∗ @return \ I l l u m i n a t e \ Http \ Response
∗/
if ( Gate : : d e n i e s ( ’ l i m i t ’ , $project ) ) { public function destroy ( $id )
abort (403) ; {
} $subreport = Subreport : : findOrFail ( $id
);
$boreholes = Project : : findOrFail (
$ p r o j e c t −>i d )−>b o r e h o l e s ; if ( Gate : : d e n i e s ( ’ l i m i t ’ , $ s u b r e p o r t −>
$ s a m p l e s = Sample : : j o i n ( ’ b o r e h o l e s ’ , ’ project ) ) {
s a m p l e s . b h i d ’ , ’= ’ , ’ b o r e h o l e s . abort (403) ;
id ’ ) }
−>where ( ’ b o r e h o l e s . p r o j i d ’ ,
63
$ l i m i t s = S u b r e p o r t : : f i n d ( $ s u b r e p o r t −> u s e App\ S u b r e p o r t ;
i d )−> l i m i t s ; u s e I l l u m i n a t e \ Http \ R e q u e s t ;
u s e App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ;
$ p r e v i o u s s a m p l e i d = −1; u s e App\ Http \ R e q u e s t s \ P r o j e c t \
foreach ( $ l i m i t s a s $ l i m i t ) { StoreProjectRequest ;
$ s a m p l e = L i m i t : : f i n d ( $ l i m i t −>i d ) u s e App\ Http \ R e q u e s t s \ P r o j e c t \
−>s a m p l e s ; UpdateProjectRequest ;
i f ( $ p r e v i o u s s a m p l e i d != $sample
−>i d ) { c l a s s Proje ctContro ller extends Controller
$ f i l e p a t h = ” images / {
s u b r e p o r t s /LPTR/ sample− /∗ ∗
$sample−>i d . png ” ; ∗ Display a l i s t i n g of the resource .
if ( file exists ( $file path ) ) { ∗
i f ( ! unlink ( $ f i l e p a t h ) ) { ∗ @return \ I l l u m i n a t e \ Http \ Response
$ s t a t u s = ” warning ” ; ∗/
} public function index ( )
else { {
$status = ” success ” ; $projects = Project : : a l l () ;
}
} if ( Gate : : d e n i e s ( ’ i n d e x −p r o j e c t ’ ) ) {
} abort (403) ;
$ p r e v i o u s s a m p l e i d = $sample−>i d ; }
$ l i m i t −>d e l e t e ( ) ; r e t u r n v i e w ( ’ p r o j e c t s . i n d e x ’ , array ( ’
} p r o j e c t s ’ => $ p r o j e c t s ) ) ;
}
$ p r o j i d = $ s u b r e p o r t −>p r o j i d ;
$ s u b r e p o r t −>d e l e t e ( ) ; /∗ ∗
∗ Show t h e f o r m f o r c r e a t i n g a new
return LimitController : : resource .
recordDeleteActivity ( $proj id ) ; ∗
} ∗ @return \ I l l u m i n a t e \ Http \ Response
∗/
public function recordDeleteActivity ( public function create ()
$proj id ) {
{ //
$project = Project : : findOrFail ( }
$proj id ) ;
/∗ ∗
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e ∗ Store a newly c r e a t e d resource in
Activity : : create ([ storage .
’ p r o j i d ’ => $ p r o j e c t −>i d , ∗
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , ∗ @param \ I l l u m i n a t e \ Http \ Request
’ a c t i v i t y t y p e ’ => ” L i q u i d and $request
P l a s t i c L i m i t s Test Report i n ∗ @return \ I l l u m i n a t e \ Http \ Response
p r o j e c t <i >$ p r o j e c t −> ∗/
p r o j n a m e </i > h a s been public function store ( StoreProjectRequest
deleted . ” $request )
]) ; {
$ p r o j e c t = P r o j e c t : : c r e a t e ( $ r e q u e s t −>
$ f l a s h m e s s a g e = ” L i q u i d and P l a s t i c a l l () ) ;
L i m i t s Test Report i n p r o j e c t
$ p r o j e c t −>p r o j n a m e h a s been // Add t h e admin t o p r o j e c t e n g i n e e r s
successfully deleted . ” ; table
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s . DB : : t a b l e ( ’ p r o j e c t e n g i n e e r s ’ )−> i n s e r t
show ’ , $ p r o j e c t −>i d )−>w i t h ( ’ ( [ ’ p r o j i d ’ => $ p r o j e c t −>i d , ’
success ’ , $flash message ) ; e n g r i d ’ => 1 ] ) ;
}
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e
public function c h e c k P r e r e q u i s i t e s ( $counts Activity : : create ([
) { ’ p r o j i d ’ => $ p r o j e c t −>i d ,
$ a r e P r e r e q u i s i t e s O k a y = true ; ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
i f ( $ c o u n t s == 0 ) { ’ a c t i v i t y t y p e ’ => ” P r o j e c t <i >
$arePrerequisitesOkay = false ; $ p r o j e c t −>p r o j n a m e </i > h a s
} been c r e a t e d . ”
]) ;
i f ( ! $arePrerequisitesOkay ) {
$ f l a s h m e s s a g e = ”Some $ f l a s h m e s s a g e = ” P r o j e c t $ p r o j e c t −>
p r e r e q u i s i t e s are missing ( p r o j n a m e h a s been s u c c e s s f u l l y
b o r e h o l e s or samples ) . Please created . ” ;
add them f i r s t i n o r d e r t o r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s .
proceed smoothly . ” ; show ’ , $ p r o j e c t −>i d )−>w i t h ( ’
\ S e s s i o n : : f l a s h ( ’ warning ’ , success ’ , $flash message ) ;
$flash message ) ; }
}
} /∗ ∗
} ∗ Display the s p e c i f i e d resource .
∗
∗ @param int $id
∗ @return \ I l l u m i n a t e \ Http \ Response
Listing 12: ProjectController.php ∗/
p u b l i c f u n c t i o n show ( $ i d )
<?php {
$project = Project : : findOrFail ( $id ) ;
namespace App\ Http \ C o n t r o l l e r s ;
/∗ i f ( Gate : : d e n i e s ( ’ show−p r o j e c t ’ ,
use Auth ; $project )) {
use DB; abort (403) ;
use File ; } ∗/
use Gate ;
use Session ; $ b o r e h o l e s = $ p r o j e c t −>b o r e h o l e s ;
use Validator ; $ s e c t i o n s = $ p r o j e c t −>s e c t i o n s ;
use Helper ; $ s u b r e p o r t s = $ p r o j e c t −>s u b r e p o r t s ;
use TemplateHelper ; $ s h a l l o w s = $ p r o j e c t −>s h a l l o w s ;
use App\ A c t i v i t y ; $ d r i l l e d s h a f t s = $ p r o j e c t −>
use App\ B o r e h o l e ; drilledshafts ;
use App\ P r o j e c t ; $ d e e p s = $ p r o j e c t −>d e e p s ;
use App\ Sample ;
use App\ S e c t i o n ; r e t u r n v i e w ( ’ p r o j e c t s . show ’ , array ( ’
64
p r o j e c t ’ => $ p r o j e c t , ’ b o r e h o l e s ’ : : u s e r ( )−>i d ,
=> $ b o r e h o l e s , ’ s e c t i o n s ’ => ’ a c t i v i t y t y p e ’ =>
$ s e c t i o n s , ’ s u b r e p o r t s ’ => ” U s e r <i >
$ s u b r e p o r t s , ’ s h a l l o w s ’ => $ u s e r n a m e </i
$ s h a l l o w s , ’ d r i l l e d s h a f t s ’ => > h a s been
$ d r i l l e d s h a f t s , ’ d e e p s ’ => added t o
$deeps ) ) ; p r o j e c t <i >
} $ p r o j e c t −>
p r o j n a m e </i
/∗ ∗ >. ”
∗ Show t h e f o r m f o r e d i t i n g t h e s p e c i f i e d ]) ;
resource . }
∗ }
∗ @param int $id
∗ @return \ I l l u m i n a t e \ Http \ Response // Remove e n g i n e e r f r o m
∗/ project
public function edit ( $id ) $engineers = Helper : :
{ g e t E n g i n e e r s ( $ p r o j e c t −>i d
$project = Project : : findOrFail ( $id ) ; );
foreach ( $ e n g i n e e r s a s
if ( Gate : : d e n i e s ( ’ e d i t −p r o j e c t ’ , $engineer ) {
$project ) ) { i f ( ! i n a r r a y ( $ e n g i n e e r −>i d
abort (403) ; , $ r e q u e s t −>
} project members ) ) {
i f ( $ e n g i n e e r −>i d != 1 )
r e t u r n v i e w ( ’ p r o j e c t s . e d i t ’ , array ( ’ {
p r o j e c t ’ => $ p r o j e c t ) ) ; $matchThese = [ ’
} p r o j i d ’ =>
$ p r o j e c t −>i d , ’
/∗ ∗ e n g r i d ’ =>
∗ Update t h e s p e c i f i e d r e s o u r c e i n $ e n g i n e e r −>i d ] ;
storage . DB : : t a b l e ( ’
∗ project engineers
∗ @param \ I l l u m i n a t e \ Http \ Request ’ )−>where (
$request $matchThese )−>
∗ @param int $id delete ( ) ;
∗ @return \ I l l u m i n a t e \ Http \ Response
∗/ // Add t h e a c t i v i t y t o
p u b l i c f u n c t i o n update ( activity table
UpdateProjectRequest $request , $id ) Activity : : create ([
{ ’ p r o j i d ’ =>
$project = Project : : findOrFail ( $id ) ; $ p r o j e c t −>i d ,
’ u s e r i d ’ => Auth
// U p d a t e p r o j e c t i n f o r m a t i o n : : u s e r ( )−>i d ,
$ p r o j e c t −>u p d a t e ( [ ’ p r o j n a m e ’ => ’ a c t i v i t y t y p e ’ =>
$ r e q u e s t −>p r o j n a m e , ” U s e r <i >
’ p r o j l o c a t i o n ’ => $ r e q u e s t −> $ e n g i n e e r −>
proj location , firstname
’ p r o j c l i e n t ’ => $ r e q u e s t −> $ e n g i n e e r −>
proj client , l a s t n a m e </i >
’ p r o j d e s c r i p t i o n ’ => $ r e q u e s t −> h a s been
proj description , removed from
’ p r o j s t a r t d a t e ’ => $ r e q u e s t −> p r o j e c t <i >
proj start date , $ p r o j e c t −>
’ p r o j e n d d a t e ’ => $ r e q u e s t −> p r o j n a m e </i
proj end date , >. ”
’ p r o j d a t e s i g n e d ’ => $ r e q u e s t −> ]) ;
proj date signed }
]) ; }
}
if ( Auth : : u s e r ( )−>isAdmin ( ) ) { }
i f ( i s s e t ( $ r e q u e s t −>p r o j e c t m e m b e r s }
)) {
// Add e n g i n e e r t o p r o j e c t // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
for ( $ i = 0 ; $ i < sizeof ( Activity : : create ([
$ r e q u e s t −>p r o j e c t m e m b e r s ’ p r o j i d ’ => $ p r o j e c t −>i d ,
) ; $ i ++) { ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
$matchThese = [ ’ p r o j i d ’ ’ a c t i v i t y t y p e ’ => ” P r o j e c t <i >
=> $ p r o j e c t −>i d , ’ $ p r o j e c t −>p r o j n a m e </i > h a s
e n g r i d ’ => $ r e q u e s t been m o d i f i e d . ”
−>p r o j e c t m e m b e r s [ $ i ]) ;
]];
$match = DB : : t a b l e ( ’
p r o j e c t e n g i n e e r s ’ )−> $ f l a s h m e s s a g e = ” P r o j e c t $ p r o j e c t −>
where ( $matchThese )−> p r o j n a m e h a s been s u c c e s s f u l l y
f i r s t () ; modified . ” ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s .
i f ( i s n u l l ( $match ) ) { show ’ , $ p r o j e c t −>i d )−>w i t h ( ’
DB : : t a b l e ( ’ success ’ , $flash message ) ;
project engineers }
’ )−> i n s e r t ( [ ’
p r o j i d ’ => /∗ ∗
$ p r o j e c t −>i d , ’ ∗ Remove t h e s p e c i f i e d r e s o u r c e f r o m
e n g r i d ’ => storage .
$ r e q u e s t −> ∗
project members [ ∗ @param int $id
$i ] ] ) ; ∗ @return \ I l l u m i n a t e \ Http \ Response
∗/
$user name = Helper : : public function destroy ( $id )
getUserName ( {
$ r e q u e s t −> i f ( Gate : : d e n i e s ( ’ d e s t r o y −p r o j e c t ’ ) ) {
project members [ abort (403) ;
$i ]) ; }
// Add t h e a c t i v i t y t o
activity table $project = Project : : findOrFail ( $id ) ;
Activity : : create ([ $ p r o j n a m e = $ p r o j e c t −>p r o j n a m e ;
’ p r o j i d ’ => $ p r o j e c t −>d e l e t e ( ) ;
$ p r o j e c t −>i d ,
’ u s e r i d ’ => Auth return ProjectController : :
65
r e c o r d D e l e t e A c t i v i t y ( $proj name ) ; r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s .
} i n d e x ’ )−>w i t h ( $ s t a t u s ,
$flash message ) ;
public function recordDeleteActivity ( }
$proj name )
{ /∗ ∗
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e ∗ Display a l i s t i n g of the user ’ s
Activity : : create ([ resource .
’ p r o j i d ’ => n u l l , ∗
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , ∗ @return \ I l l u m i n a t e \ Http \ Response
’ a c t i v i t y t y p e ’ => ” P r o j e c t <i > ∗/
$ p r o j n a m e </i > h a s been public function viewActive ( $id )
deleted . ” {
]) ; i f ( Gate : : d e n i e s ( ’ view−a c t i v e −p r o j e c t ’
, $id ) ) {
$ f l a s h m e s s a g e = ” P r o j e c t $proj name abort (403) ;
h a s been s u c c e s s f u l l y d e l e t e d . ” ; }
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s .
i n d e x ’ )−>w i t h ( ’ s u c c e s s ’ , $ p r o j e c t s = DB : : s e l e c t ( ’SELECT pe .
$flash message ) ; p r o j i d , p . proj name , p .
} p r o j i m a g e FROM p r o j e c t s p ,
p r o j e c t e n g i n e e r s pe WHERE p . i d =
public function archive ( $id ) pe . p r o j i d AND pe . e n g r i d = ?
{ AND p . p r o j s t a t u s = 0 ’ , [ $ i d ] ) ;
$project = Project : : findOrFail ( $id ) ;
r e t u r n view ( ’ p r o j e c t s . viewActive ’ ,
if ( Gate : : d e n i e s ( ’ a r c h i v e −p r o j e c t ’ ) ) { array ( ’ p r o j e c t s ’ => $ p r o j e c t s ) ) ;
abort (403) ; }
}
public function viewArchived ( )
i f ( $ p r o j e c t −>i s T a g g e d ( ) ) { {
$ p r o j e c t −>u p d a t e ( [ if ( Gate : : d e n i e s ( ’ view−a r c h i v e d −
’ p r o j s t a t u s ’ => 2 project ’ ) ) {
]) ; abort (403) ;
}
// Add t h e a c t i v i t y t o a c t i v i t y
table $ p r o j e c t s = P r o j e c t : : where ( ’
Activity : : create ([ p r o j s t a t u s ’ , 2 )−>g e t ( ) ;
’ p r o j i d ’ => $ p r o j e c t −>i d ,
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , r e t u r n view ( ’ p r o j e c t s . viewArchived ’ ,
’ a c t i v i t y t y p e ’ => ” P r o j e c t <i array ( ’ p r o j e c t s ’ => $ p r o j e c t s ) ) ;
>$ p r o j e c t −>p r o j n a m e </i > }
h a s been a r c h i v e d . ”
]) ; p u b l i c f u n c t i o n viewCompiledReport ( $ i d )
{
$flash message = ” Project $project $project = Project : : findOrFail ( $id ) ;
−>p r o j n a m e h a s been i f ( Gate : : d e n i e s ( ’ view−c o m p i l e d −r e p o r t
s u c c e s s f u l l y archived . ” ; ’ , $project ) ) {
$status = ” success ” ; abort (403) ;
} }
else {
$flash message = ” Project $project ob start ( ) ;
−>p r o j n a m e c a n n o t be l i s t ( $ b o r e h o l e s , $samples , $ s e c t i o n s ,
a r c h i v e d because i t i s not $section bodies , $subreports ,
yet tagged . ” ; $liquid limits , $plastic limits )
$status = ” error ” ; = TemplateHelper : : g e t V a r i a b l e s (
} $id ) ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s .
i n d e x ’ )−>w i t h ( $ s t a t u s , $ c o n t e n t = view ( ’ i n c l u d e s . template ’ , [
$flash message ) ; ’ p r o j e c t ’ => $ p r o j e c t ,
} ’ b o r e h o l e s ’ => $ b o r e h o l e s ,
’ s a m p l e s ’ => $ s a m p l e s ,
public f u n c t i o n tag ( $id ) ’ s e c t i o n s ’ => $ s e c t i o n s ,
{ ’ s e c t i o n b o d i e s ’ =>
$project = Project : : findOrFail ( $id ) ; $section bodies ,
’ s u b r e p o r t s ’ => $ s u b r e p o r t s ,
if ( Gate : : d e n i e s ( ’ tag−p r o j e c t ’ , ’ l i q u i d l i m i t s ’ => $ l i q u i d l i m i t s ,
$project ) ) { ’ p l a s t i c l i m i t s ’ =>
abort (403) ; $plastic limits ,
} ] )−>r e n d e r ( ) ;
// Add t h e a c t i v i t y t o a c t i v i t y try {
table $ h t m l 2 p d f = new \HTML2PDF( ’P ’ , ’
Activity : : create ([ L e g a l ’ , ’ en ’ , true , ’UTF−8 ’ ,
’ p r o j i d ’ => $ p r o j e c t −>i d , array ( 2 5 . 4 , 2 0 . 4 , 2 5 . 4 , 2 0 . 4 )
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , );
’ a c t i v i t y t y p e ’ => ” P r o j e c t <i
>$ p r o j e c t −>p r o j n a m e </i > $ h t m l 2 p d f−>pdf−>S e t A u t h o r ( ’ E a r l
h a s been t a g g e d f o r Andrea Abad ’ ) ;
validation . ” $ h t m l 2 p d f−>pdf−>S e t T i t l e ( $ p r o j e c t
]) ; −>p r o j n a m e ) ;
66
a p p l i c a t i o n / pdf ’ ) else {
−>header ( ’ Content−Length ’ , $from = $ t o = ” ” ;
strlen ( $pdf ) ) $run length default = 0.30;
−>header ( ’ Content−D i s p o s i t i o n ’ , }
’ i n l i n e ; f i l e n a m e =” ’ .
$filename . ’” ’ ) ; // C r e a t e s a m p l e
} $ s a m p l e = Sample : : c r e a t e ( [
c a t c h ( HTML2PDF exception $ e ) { ’ b h i d ’ => $ r e q u e s t −>b h i d ,
echo $ e ; ’ u s c s i d ’ => $ r e q u e s t −>u s c s i d ,
exit ; ’ sample num ’ => $ r e q u e s t −>
} sample num ,
} ’ s a m p l e f r o m ’ => ( empty( trim (
} $ r e q u e s t −>s a m p l e f r o m ) ) ) ?
$from : $ r e q u e s t −>s a m p l e f r o m
,
’ s a m p l e t o ’ => ( empty ( trim (
Listing 13: SampleController.php $ r e q u e s t −>s a m p l e t o ) ) ) ? $ t o
: $ r e q u e s t −>s a m p l e t o ,
<?php ’ s a m p l e c o n t r a c t n u m ’ => $ r e q u e s t
−>s a m p l e c o n t r a c t n u m ,
namespace App\ Http \ C o n t r o l l e r s ; ’ s a m p l e j o b n u m ’ => $ r e q u e s t −>
sample job num ,
use Auth ; ’ s a m p l e c o l o r ’ => $ r e q u e s t −>
use DB; sample color ,
use Gate ; ’ s a m p l e r u n l e n g t h ’ => ( empty ( trim
use App\ A c t i v i t y ; ( $ r e q u e s t −>s a m p l e r u n l e n g t h )
use App\ Sample ; ) ) ? $run length default :
use App\ B o r e h o l e ; $ r e q u e s t −>s a m p l e r u n l e n g t h ,
use I l l u m i n a t e \ Http \ R e q u e s t ; ’ s a m p l e s a m p l e l e n g t h ’ => $ r e q u e s t
use App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ; −>s a m p l e s a m p l e l e n g t h ,
use App\ Http \ R e q u e s t s \ Sample \ ’ s a m p l e r e c p e r c e n t ’ => $ r e q u e s t −>
StoreSampleRequest ; sample rec percent ,
u s e App\ Http \ R e q u e s t s \ Sample \ ’ s a m p l e n m c p e r c e n t ’ => $ r e q u e s t −>
UpdateSampleRequest ; sample nmc percent ,
’ s a m p l e n u m o f b l o w s ’ => $ r e q u e s t
c l a s s SampleController extends Controller −>s a m p l e n u m o f b l o w s ,
{ ’ s a m p l e l i q u i d l i m i t ’ => $ r e q u e s t
/∗ ∗ −>s a m p l e l i q u i d l i m i t ,
∗ Display a l i s t i n g of the resource . ’ s a m p l e p l a s t i c l i m i t ’ => $ r e q u e s t
∗ −>s a m p l e p l a s t i c l i m i t ,
∗ @return \ I l l u m i n a t e \ Http \ Response ’ s a m p l e p l a s t i c i t y i n d e x ’ =>
∗/ $ r e q u e s t −>
public function index ( ) sample plasticity index ,
{ ’ s a m p l e p l a s t i c i t y r e m a r k ’ =>
// $ r e q u e s t −>
} sample plasticity remark ,
’ s a m p l e t e s t e r ’ => $ r e q u e s t −>
/∗ ∗ sample tester ,
∗ Show t h e f o r m f o r c r e a t i n g a new ’ s a m p l e t y p e o f s a m p l i n g ’ =>
resource . $ r e q u e s t −>
∗ sample type of sampling ,
∗ @return \ I l l u m i n a t e \ Http \ Response ’ s a m p l e t e s t d a t e ’ => $ r e q u e s t −>
∗/ sample test date
public function create ( $id ) ]) ;
{
$borehole = Borehole : : findOrFail ( $id ) ; // I n c r e m e n t t h e number o f b o r e h o l e s
in p r o j e c t t a b l e
if ( Gate : : d e n i e s ( ’ s a m p l e ’ , $borehole ) ) DB : : t a b l e ( ’ b o r e h o l e s ’ )−>w h e r e I d (
{ $ r e q u e s t −>b h i d )−>i n c r e m e n t ( ’
abort (403) ; bh num of samples ’ ) ;
}
$project = Borehole : : findOrFail (
$ p r o j e c t = $ b o r e h o l e −>p r o j e c t ; $ r e q u e s t −>b h i d )−>p r o j e c t ;
$ u s c s = DB : : t a b l e ( ’ u s c s ’ )−>o r d e r B y ( ’ i d $borehole = Borehole : : findOrFail (
’ )−>g e t ( ) ; $ r e q u e s t −>b h i d ) ;
$previous sample = Borehole : : find (
$ b o r e h o l e −>i d )−>s a m p l e s −>s o r t B y ( ’ // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
sample num ’ )−> l a s t ( ) ; Activity : : create ([
’ p r o j i d ’ => $ p r o j e c t −>i d ,
r e t u r n v i e w ( ’ s a m p l e s . c r e a t e ’ , array ( ’ ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
b o r e h o l e ’ => $ b o r e h o l e , ’ p r o j e c t ’ ’ a c t i v i t y t y p e ’ => ” Sample <i >
=> $ p r o j e c t , ’ u s c s ’ => $ u s c s , ’ $sample−>sample num </i > i n
p r e v i o u s s a m p l e ’ => b o r e h o l e <i >$ b o r e h o l e −>bh num
$previous sample ) ) ; </i >, p r o j e c t <i >$ p r o j e c t −>
} p r o j n a m e </i > h a s been
created . ”
/∗ ∗ ]) ;
∗ Store a newly c r e a t e d resource in
storage . $ f l a s h m e s s a g e = ” Sample $sample−>
∗ sample num i n b o r e h o l e $ b o r e h o l e
∗ @param \ I l l u m i n a t e \ Http \ Request −>bh num , p r o j e c t $ p r o j e c t −>
$request p r o j n a m e h a s been c r e a t e d . ” ;
∗ @return \ I l l u m i n a t e \ Http \ Response r e t u r n r e d i r e c t ( )−>r o u t e ( ’ b o r e h o l e s .
∗/ show ’ , $ b o r e h o l e −>i d )−>w i t h ( ’
p u b l i c f u n c t i o n s t o r e ( StoreSampleRequest success ’ , $flash message ) ;
$request ) }
{
$previous sample = Borehole : : find ( /∗ ∗
$ r e q u e s t −>b h i d )−>s a m p l e s −>s o r t B y ∗ Display the s p e c i f i e d resource .
( ’ sample num ’ )−> l a s t ( ) ; ∗
i f ( $ p r e v i o u s s a m p l e != n u l l ) { ∗ @param int $id
$from = $ p r e v i o u s s a m p l e −> ∗ @return \ I l l u m i n a t e \ Http \ Response
sample to ; ∗/
$ t o = $from + $ p r e v i o u s s a m p l e −> p u b l i c f u n c t i o n show ( $ i d )
sample run length ; {
$run length default = //
$ p r e v i o u s s a m p l e −> }
sample run length ;
} /∗ ∗
67
∗ Show t h e f o r m f o r e d i t i n g t h e s p e c i f i e d </i >, p r o j e c t <i >$ p r o j e c t −>
resource . p r o j n a m e </i > h a s been
∗ modified . ”
∗ @param int $id ]) ;
∗ @return \ I l l u m i n a t e \ Http \ Response
∗/ $ f l a s h m e s s a g e = ” Sample $sample−>
public function edit ( $id ) sample num i n b o r e h o l e $ b o r e h o l e
{ −>bh num , p r o j e c t $ p r o j e c t −>
$ s a m p l e = Sample : : f i n d O r F a i l ( $ i d ) ; p r o j n a m e h a s been s u c c e s s f u l l y
$ b o r e h o l e = Sample : : f i n d ( $sample−>i d ) modified . ” ;
−>b o r e h o l e ; r e t u r n r e d i r e c t ( )−>r o u t e ( ’ b o r e h o l e s .
show ’ , $ b o r e h o l e −>i d )−>w i t h ( ’
if ( Gate : : d e n i e s ( ’ s a m p l e ’ , $borehole ) ) success ’ , $flash message ) ;
{
abort (403) ; }
}
/∗ ∗
$ p r o j e c t = B o r e h o l e : : f i n d ( $ b o r e h o l e −> ∗ Remove t h e s p e c i f i e d r e s o u r c e f r o m
i d )−>p r o j e c t ; storage .
$ u s c s = DB : : t a b l e ( ’ u s c s ’ )−>o r d e r B y ( ’ i d ∗
’ )−>g e t ( ) ; ∗ @param int $id
∗ @return \ I l l u m i n a t e \ Http \ Response
r e t u r n v i e w ( ’ s a m p l e s . e d i t ’ , array ( ’ ∗/
s a m p l e ’ => $sample , ’ b o r e h o l e ’ => public function destroy ( $id )
$ b o r e h o l e , ’ p r o j e c t ’ => $ p r o j e c t {
, ’ u s c s ’ => $ u s c s ) ) ; $ s a m p l e = Sample : : f i n d O r F a i l ( $ i d ) ;
}
if ( Gate : : d e n i e s ( ’ s a m p l e ’ , $sample−>
/∗ ∗ borehole ) ) {
∗ Update t h e s p e c i f i e d r e s o u r c e i n abort (403) ;
storage . }
∗
∗ @param \ I l l u m i n a t e \ Http \ Request $sample num = $sample−>sample num ;
$request $ b h i d = $sample−>b h i d ;
∗ @param int $id
∗ @return \ I l l u m i n a t e \ Http \ Response $sample−>d e l e t e ( ) ;
∗/
p u b l i c f u n c t i o n u p d a t e ( UpdateSampleRequest return SampleController : :
$request , $id ) r e c o r d D e l e t e A c t i v i t y ( $bh id ,
{ $sample num ) ;
$ s a m p l e = Sample : : f i n d O r F a i l ( $ i d ) ; }
$borehole = Borehole : : findOrFail (
$ r e q u e s t −>b h i d ) ; public function recordDeleteActivity (
$project = Borehole : : findOrFail ( $ b h i d , $sample num )
$ r e q u e s t −>b h i d )−>p r o j e c t ; {
// D e c r e m e n t t h e number o f s a m p l e s i n
// U p d a t e s a m p l e i n f o r m a t i o n boreholes table
$sample−>u p d a t e ( [ DB : : t a b l e ( ’ b o r e h o l e s ’ )−>w h e r e I d ( $ b h i d
’ u s c s i d ’ => $ r e q u e s t −>u s c s i d , )−>d e c r e m e n t ( ’ b h n u m o f s a m p l e s ’ )
’ sample num ’ => $ r e q u e s t −> ;
sample num ,
’ s a m p l e f r o m ’ => $ r e q u e s t −> // Change b o r e h o l e number o f t h e r e s t
sample from , of the boreholes accordingly
’ s a m p l e t o ’ => $ r e q u e s t −>s a m p l e t o $ s a m p l e s = Sample : : where ( ’ b h i d ’ ,
, $bh id )
’ s a m p l e c o n t r a c t n u m ’ => $ r e q u e s t −>where ( ’ sample num ’ , ’> ’ ,
−>s a m p l e c o n t r a c t n u m , $sample num )
’ s a m p l e j o b n u m ’ => $ r e q u e s t −> −>g e t ( ) ;
sample job num ,
’ s a m p l e c o l o r ’ => $ r e q u e s t −> foreach ( $ s a m p l e s a s $ s a m p l e ) {
sample color , DB : : t a b l e ( ’ s a m p l e s ’ )−>w h e r e I d (
’ s a m p l e r u n l e n g t h ’ => ( empty ( trim $sample−>i d )−>d e c r e m e n t ( ’
( $ r e q u e s t −>s a m p l e r u n l e n g t h ) sample num ’ ) ;
) ) ? 0 . 3 0 : $ r e q u e s t −> }
sample run length ,
’ s a m p l e s a m p l e l e n g t h ’ => $ r e q u e s t $project = Borehole : : findOrFail ( $bh id
−>s a m p l e s a m p l e l e n g t h , )−>p r o j e c t ;
’ s a m p l e r e c p e r c e n t ’ => $ r e q u e s t −> $borehole = Borehole : : findOrFail (
sample rec percent , $bh id ) ;
’ s a m p l e n m c p e r c e n t ’ => $ r e q u e s t −> // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
sample nmc percent , Activity : : create ([
’ s a m p l e n u m o f b l o w s ’ => $ r e q u e s t ’ p r o j i d ’ => $ p r o j e c t −>i d ,
−>s a m p l e n u m o f b l o w s , ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
’ s a m p l e l i q u i d l i m i t ’ => $ r e q u e s t ’ a c t i v i t y t y p e ’ => ” Sample <i >
−>s a m p l e l i q u i d l i m i t , $sample num </i > i n b o r e h o l e <
’ s a m p l e p l a s t i c l i m i t ’ => $ r e q u e s t i >$ b o r e h o l e −>bh num</i >,
−>s a m p l e p l a s t i c l i m i t , p r o j e c t <i >$ p r o j e c t −>
’ s a m p l e p l a s t i c i t y i n d e x ’ => p r o j n a m e </i > h a s been
$ r e q u e s t −> deleted . ”
sample plasticity index , ]) ;
’ s a m p l e p l a s t i c i t y r e m a r k ’ =>
$ r e q u e s t −> $ f l a s h m e s s a g e = ” Sample $sample num
sample plasticity remark , i n b o r e h o l e $ b o r e h o l e −>bh num ,
’ s a m p l e t e s t e r ’ => $ r e q u e s t −> p r o j e c t $ p r o j e c t −>p r o j n a m e h a s
sample tester , been s u c c e s s f u l l y d e l e t e d . ” ;
’ s a m p l e t y p e o f s a m p l i n g ’ => r e t u r n r e d i r e c t ( )−>r o u t e ( ’ b o r e h o l e s .
$ r e q u e s t −> show ’ , $ b o r e h o l e −>i d )−>w i t h ( ’
sample type of sampling , success ’ , $flash message ) ;
’ s a m p l e t e s t d a t e ’ => $ r e q u e s t −> }
sample test date }
]) ;
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e
Activity : : create ([
’ p r o j i d ’ => $ p r o j e c t −>i d ,
Listing 14: SectionController.php
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , <?php
’ a c t i v i t y t y p e ’ => ” Sample <i >
$sample−>sample num </i > i n namespace App\ Http \ C o n t r o l l e r s ;
b o r e h o l e <i >$ b o r e h o l e −>bh num
68
use Auth ; ∗ @return \ I l l u m i n a t e \ Http \ Response
use DB; ∗/
use Input ; p u b l i c f u n c t i o n show ( $ i d )
use Helper ; {
use Gate ; $section = Section : : findOrFail ( $id ) ;
use App\ A c t i v i t y ; $ p r o j e c t = $ s e c t i o n −>p r o j e c t ;
use App\ P r o j e c t ;
use App\ S e c t i o n ; if ( Gate : : d e n i e s ( ’ show−s e c t i o n ’ ,
use App\ S e c t i o n B o d y ; $project ) ) {
use I l l u m i n a t e \ Http \ R e q u e s t ; abort (403) ;
use App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ; }
use App\ Http \ R e q u e s t s \ S e c t i o n \
StoreSectionRequest ; r e t u r n v i e w ( ’ s e c t i o n s . show ’ , array ( ’
u s e App\ Http \ R e q u e s t s \ S e c t i o n \ s e c t i o n ’ => $ s e c t i o n , ’ p r o j e c t ’
UpdateSectionRequest ; => $ p r o j e c t ) ) ;
}
c l a s s SectionController extends Controller
{ /∗ ∗
/∗ ∗ ∗ Show t h e f o r m f o r e d i t i n g t h e s p e c i f i e d
∗ Display a l i s t i n g of the resource . resource .
∗ ∗
∗ @return \ I l l u m i n a t e \ Http \ Response ∗ @param int $id
∗/ ∗ @return \ I l l u m i n a t e \ Http \ Response
public function index ( ) ∗/
{ public function edit ( $id )
// {
} $section = Section : : findOrFail ( $id ) ;
$ p r o j e c t = $ s e c t i o n −>p r o j e c t ;
/∗ ∗
∗ Show t h e f o r m f o r c r e a t i n g a new if ( Gate : : d e n i e s ( ’ s e c t i o n ’ , $project ) )
resource . {
∗ abort (403) ;
∗ @return \ I l l u m i n a t e \ Http \ Response }
∗/
public function create () r e t u r n v i e w ( ’ s e c t i o n s . e d i t ’ , array ( ’
{ s e c t i o n ’ => $ s e c t i o n , ’ p r o j e c t ’
$ p r o j e c t = P r o j e c t : : f i n d O r F a i l ( $ POST [ => $ p r o j e c t ) ) ;
” proj id ” ]) ; }
if ( Gate : : d e n i e s ( ’ s e c t i o n ’ , $project ) ) /∗ ∗
{ ∗ Update t h e s p e c i f i e d r e s o u r c e i n
abort (403) ; storage .
} ∗
∗ @param \ I l l u m i n a t e \ Http \ Request
r e t u r n v i e w ( ’ s e c t i o n s . c r e a t e ’ , array ( ’ $request
p r o j e c t ’ => $ p r o j e c t ) ) ; ∗ @param int $id
} ∗ @return \ I l l u m i n a t e \ Http \ Response
∗/
/∗ ∗ p u b l i c f u n c t i o n update (
∗ Store a newly c r e a t e d resource in UpdateSectionRequest $request , $id )
storage . {
∗ $section body = Section : : findOrFail (
∗ @param \ I l l u m i n a t e \ Http \ Request $ i d )−>s e c t i o n B o d y ;
$request $ s e c t i o n b o d y −>s e c t i o n t e x t = $ r e q u e s t
∗ @return \ I l l u m i n a t e \ Http \ Response −>i n p u t ( ’ s e c t i o n t e x t ’ ) ;
∗/ $ s e c t i o n b o d y −>s a v e ( ) ;
public function store ( StoreSectionRequest
$request ) $ p r o j e c t = S e c t i o n : : f i n d ( $ i d )−>p r o j e c t
{ ;
// S t o r e d a t a t o s e c t i o n s t a b l e $section name = Helper : : getSectionName
$ i n p u t = $ r e q u e s t −>o n l y ( [ ’ p r o j i d ’ , ’ ( $ r e q u e s t −>s e c t i o n k e y ) ;
section key ’ ]) ; // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
$ s e c t i o n = Section : : create ( $input ) ; Activity : : create ([
$ s e c t i o n i d = $ s e c t i o n −>i d ; ’ p r o j i d ’ => $ p r o j e c t −>i d ,
’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
// S t o r e d a t a t o s e c t i o n b o d i e s t a b l e ’ a c t i v i t y t y p e ’ => ” R e p o r t s e c t i o n
$ i n p u t = $ r e q u e s t −>o n l y ( [ ’ s e c t i o n t e x t <i >$ s e c t i o n n a m e </i > i n
’ ]) ; p r o j e c t <i >$ p r o j e c t −>
$input [ ’ s e c t i o n i d ’ ] = $ s e c t i o n i d ; p r o j n a m e </i > h a s been
SectionBody : : c r e a t e ( $input ) ; modified . ”
]) ;
$project = Section : : findOrFail (
$ s e c t i o n i d )−>p r o j e c t ; $ f l a s h m e s s a g e = ” Report s e c t i o n
$section name = Helper : : getSectionName $section name in project $project
( $ r e q u e s t −>s e c t i o n k e y ) ; −>p r o j n a m e h a s been s u c c e s s f u l l y
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e modified . ” ;
Activity : : create ([ r e t u r n r e d i r e c t ( )−>r o u t e ( ’ s e c t i o n s .
’ p r o j i d ’ => $ p r o j e c t −>i d , show ’ , $ s e c t i o n b o d y −>s e c t i o n i d )
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , −>w i t h ( ’ s u c c e s s ’ , $ f l a s h m e s s a g e )
’ a c t i v i t y t y p e ’ => ” R e p o r t s e c t i o n ;
<i >$ s e c t i o n n a m e </i > i n }
p r o j e c t <i >$ p r o j e c t −>
p r o j n a m e </i > h a s been /∗ ∗
created . ” ∗ Remove t h e s p e c i f i e d r e s o u r c e f r o m
]) ; storage .
∗
$ f l a s h m e s s a g e = ” Report s e c t i o n ∗ @param int $id
$section name in project $project ∗ @return \ I l l u m i n a t e \ Http \ Response
−>p r o j n a m e h a s been s u c c e s s f u l l y ∗/
created . ” ; public function destroy ( $id )
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ s e c t i o n s . {
show ’ , $ s e c t i o n i d )−>w i t h ( ’ $section = Section : : findOrFail ( $id ) ;
success ’ , $flash message ) ; ;
} if ( Gate : : d e n i e s ( ’ s e c t i o n ’ , P r o j e c t : :
f i n d ( $ s e c t i o n −>p r o j i d ) ) ) {
/∗ ∗ abort (403) ;
∗ Display the specified resource . }
∗
∗ @param int $id $ s e c t i o n k e y = $ s e c t i o n −>s e c t i o n k e y ;
69
$ p r o j i d = $ s e c t i o n −>p r o j i d ; $shallows ) ) ;
$ s e c t i o n −>d e l e t e ( ) ;
r e t u r n v i e w ( ’ s h a l l o w s . i n d e x ’ , array ( ’
return SectionController : : p r o j e c t ’ => $ p r o j e c t , ’ b o r e h o l e s ’
recordDeleteActivity ( $proj id , => $ b o r e h o l e s , ’ s a m p l e s ’ =>
$section key ) ; $ s a m p l e s , ’ s h a l l o w s ’ => $ s h a l l o w s
));
} }
70
’ shallow gamma1 ’ => id ’ )
$ r e q u e s t −> −>where ( ’ b o r e h o l e s . p r o j i d ’ ,
shallow gamma1 [ $ i ] , $ p r o j e c t −>i d )
’ shallow gamma2 ’ => −> s e l e c t ( ’ s a m p l e s . i d ’ , ’ s a m p l e s .
$ r e q u e s t −> b h i d ’ , ’ s a m p l e s . sample num ’ ,
shallow gamma2 [ $ i ] , ’ samples . sample to ’ , ’
’ s h a l l o w f s ’ => $ r e q u e s t −> samples . sample num of blows ’ )
shallow fs [ $i ] , −>groupBy ( ’ s a m p l e s . i d ’ )
’ s h a l l o w s o i l ’ => $ r e q u e s t −>o r d e r B y ( ’ s a m p l e s . b h i d ’ )
−>s h a l l o w s o i l [ $k ] , −>o r d e r B y ( ’ s a m p l e s . i d ’ )
’ s h a l l o w c ’ => $ r e q u e s t −> −>g e t ( ) ;
s h a l l o w c [ $k ] , $ s h a l l o w s = S h a l l o w : : where ( ’ p r o j i d ’ ,
’ s h a l l o w q u l t ’ => $ r e q u e s t $ i d )−>g e t ( ) ;
−>s h a l l o w q u l t [ $k ] ,
’ s h a l l o w q ’ => $ r e q u e s t −> S h a l l o w C o n t r o l l e r : : isUpdated ( $project
s h a l l o w q [ $k ] −>i d , s i z e o f ( $ s a m p l e s ) , s i z e o f (
]) ; $shallows ) ) ;
$ j ++; r e t u r n v i e w ( ’ s h a l l o w s . e d i t ’ , array ( ’
$k++; p r o j e c t ’ => $ p r o j e c t , ’ b o r e h o l e s ’
} => $ b o r e h o l e s , ’ s a m p l e s ’ =>
$j = 0; $ s a m p l e s , ’ s h a l l o w s ’ => $ s h a l l o w s
} ));
}
i f ( ( s i z e o f ( $ r e q u e s t −>s h a l l o w i s c h o s e n
) > 0 ) && ( $ r e q u e s t −> /∗ ∗
s h a l l o w i s c h o s e n [ 0 ] > −1) ) { ∗ Update t h e s p e c i f i e d r e s o u r c e i n
f o r ( $ i = 0 ; $ i < s i z e o f ( $ r e q u e s t −> storage .
s h a l l o w i s c h o s e n ) ; $ i ++) { ∗
for ( $j = 0 ; $j < sizeof ( ∗ @param \ I l l u m i n a t e \ Http \ Request
$ r e q u e s t −>s a m p l e i d ) ; $ j $request
++) { ∗ @param int $id
i f ( $ r e q u e s t −> ∗ @return \ I l l u m i n a t e \ Http \ Response
shallow is chosen [ $i ] ∗/
== $ r e q u e s t −> p u b l i c f u n c t i o n update (
sample id [ $j ] ) { UpdateShallowRequest $request , $id )
$ s h a l l o w = Sample : : {
f i n d ( $ r e q u e s t −> // U p d a t e i n f o r m a t i o n
s a m p l e i d [ $ j ] )−> $project = Project : : findOrFail ( $id ) ;
shallow ; $ j = $k = 0 ;
$ s h a l l o w −>u p d a t e ( [ ’ f o r ( $ i = 0 ; $ i < $ p r o j e c t −>
shallow is chosen p r o j n u m o f b o r e h o l e s ; $ i ++) {
’ => 1 ] ) ; while ( $ j < $ r e q u e s t −>
} num of samples [ $ i ] ) {
} $shallow = Shallow : : findOrFail
} ( $ r e q u e s t −>s h a l l o w i d [ $k
} ]) ;
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e $ s h a l l o w −>u p d a t e ( [
Activity : : create ([ ’ s h a l l o w B ’ => $ r e q u e s t −>
’ p r o j i d ’ => $ p r o j e c t −>i d , shallow B [ $i ] ,
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , ’ s h a l l o w p h i ’ => $ r e q u e s t
’ a c t i v i t y t y p e ’ => ” Data f o r SBC −>s h a l l o w p h i [ $ i ] ,
for shallow foundation in ’ s h a l l o w N c ’ => $ r e q u e s t −>
p r o j e c t <i >$ p r o j e c t −> shallow Nc [ $i ] ,
p r o j n a m e </i > h a s been ’ shallow Ngamma ’ =>
created . ” $ r e q u e s t −>
]) ; shallow Ngamma [ $ i ] ,
’ s h a l l o w N q ’ => $ r e q u e s t −>
$ f l a s h m e s s a g e = ” Data f o r SBC f o r shallow Nq [ $ i ] ,
shallow foundation in project ’ shallow gamma1 ’ =>
$ p r o j e c t −>p r o j n a m e h a s been $ r e q u e s t −>
s u c c e s s f u l l y saved . ” ; shallow gamma1 [ $ i ] ,
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ s h a l l o w s . ’ shallow gamma2 ’ =>
i n d e x ’ , $ p r o j e c t −>i d )−>w i t h ( ’ $ r e q u e s t −>
success ’ , $flash message ) ; shallow gamma2 [ $ i ] ,
} ’ s h a l l o w f s ’ => $ r e q u e s t −>
shallow fs [ $i ] ,
/∗ ∗ ’ s h a l l o w s o i l ’ => $ r e q u e s t
∗ Display the s p e c i f i e d resource . −>s h a l l o w s o i l [ $k ] ,
∗ ’ s h a l l o w c ’ => $ r e q u e s t −>
∗ @param int $id s h a l l o w c [ $k ] ,
∗ @return \ I l l u m i n a t e \ Http \ Response ’ s h a l l o w q u l t ’ => $ r e q u e s t
∗/ −>s h a l l o w q u l t [ $k ] ,
p u b l i c f u n c t i o n show ( $ i d ) ’ s h a l l o w q ’ => $ r e q u e s t −>
{ s h a l l o w q [ $k ] ,
// ’ s h a l l o w i s c h o s e n ’ => 0
} ]) ;
/∗ ∗ $ j ++;
∗ Show t h e f o r m f o r e d i t i n g t h e s p e c i f i e d $k++;
resource . }
∗ $j = 0;
∗ @param int $id }
∗ @return \ I l l u m i n a t e \ Http \ Response
∗/ i f ( ( s i z e o f ( $ r e q u e s t −>s h a l l o w i s c h o s e n
public function edit ( $id ) ) > 0 ) && ( $ r e q u e s t −>
{ s h a l l o w i s c h o s e n [ 0 ] > −1) ) {
$project = Project : : findOrFail ( $id ) ; f o r ( $ i = 0 ; $ i < s i z e o f ( $ r e q u e s t −>
s h a l l o w i s c h o s e n ) ; $ i ++) {
if ( Gate : : d e n i e s ( ’ s h a l l o w ’ , $project ) ) for ( $j = 0 ; $j < sizeof (
{ $ r e q u e s t −>s a m p l e i d ) ; $ j
abort (403) ; ++) {
} i f ( $ r e q u e s t −>
shallow is chosen [ $i ]
$boreholes = Project : : findOrFail ( == $ r e q u e s t −>
$ p r o j e c t −>i d )−>b o r e h o l e s ; sample id [ $j ] ) {
$ s a m p l e s = Sample : : j o i n ( ’ b o r e h o l e s ’ , ’ $ s h a l l o w = Sample : :
s a m p l e s . b h i d ’ , ’= ’ , ’ b o r e h o l e s . f i n d ( $ r e q u e s t −>
71
s a m p l e i d [ $ j ] )−>
shallow ; // Check i f a new s a m p l e h a s b e e n
$ s h a l l o w −>u p d a t e ( [ ’ created
shallow is chosen e l s e i f ( $ s i z e o f s a m p l e s !=
’ => 1 ] ) ; $size of shallows ) {
} $ i s u p d a t e d = true ;
} }
}
} i f ( $is updated ) {
$route = route ( ’ shallows .
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e deleteAndCreate ’ , $ p r o j i d ) ;
Activity : : create ([ $ f l a s h m e s s a g e = ” Samples were
’ p r o j i d ’ => $ r e q u e s t −>p r o j i d , recently modified . Please
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , u p d a t e t h e d a t a by <a h r e f=
’ a c t i v i t y t y p e ’ => ” Data f o r SBC $ r o u t e c l a s s =’ btn btn−l i n k
for shallow foundation in btn−sm’> c r e a t i n g a new one </a
p r o j e c t <i >$ p r o j e c t −> > to avoid e r r o r s . ” ;
p r o j n a m e </i > h a s been \ Session : : f l a s h ( ’ warning e ’ ,
modified . ” $flash message ) ;
]) ; }
return ;
$ f l a s h m e s s a g e = ” Data f o r SBC f o r }
shallow foundation in project
$ p r o j e c t −>p r o j n a m e h a s been public function deleteAndCreate ( $ p r o j i d )
s u c c e s s f u l l y modified . ” ; {
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ s h a l l o w s . $matchThese = [ ’ p r o j i d ’ => $ p r o j i d ,
i n d e x ’ , $ p r o j e c t −>i d )−>w i t h ( ’ ’ e n g r i d ’ => Auth : : u s e r ( )−>i d ] ;
success ’ , $flash message ) ; $ p r o j e c t = DB : : t a b l e ( ’
} p r o j e c t e n g i n e e r s ’ )−>where (
$matchThese )−>g e t ( ) ;
/∗ ∗
∗ Remove t h e s p e c i f i e d r e s o u r c e f r o m i f ( s i z e o f ( $ p r o j e c t ) == 0 ) {
storage . r e t u r n view ( ’ e r r o r s . 4 0 3 ’ ) ; ;
∗ }
∗ @param int $id
∗ @return \ I l l u m i n a t e \ Http \ Response ShallowController : : destroy ( $proj id ) ;
∗/ return ShallowController : : create (
public function destroy ( $id ) $proj id ) ;
{ }
$ s h a l l o w s = P r o j e c t : : f i n d O r F a i l ( $ i d )−>
shallows ; public function checkPrerequisites (
$boreholes , $samples ) {
if ( Gate : : d e n i e s ( ’ s h a l l o w ’ , Project : : $ a r e P r e r e q u i s i t e s O k a y = true ;
find ( $id ) ) ) { i f ( s i z e o f ( $ b o r e h o l e s ) == 0 ) {
abort (403) ; $arePrerequisitesOkay = false ;
} }
i f ( s i z e o f ( $ s a m p l e s ) == 0 ) {
foreach ( $ s h a l l o w s a s $ s h a l l o w ) { $arePrerequisitesOkay = false ;
$ s h a l l o w −>d e l e t e ( ) ; }
}
i f ( ! $arePrerequisitesOkay ) {
return ShallowController : : $ f l a s h m e s s a g e = ”Some
recordDeleteActivity ( $id ) ; p r e r e q u i s i t e s are missing (
} b o r e h o l e s or samples ) . Please
add them f i r s t i n o r d e r t o
public function recordDeleteActivity ( proceed smoothly . ” ;
$proj id ) \ S e s s i o n : : f l a s h ( ’ warning ’ ,
{ $flash message ) ;
$project = Project : : findOrFail ( }
$proj id ) ; }
}
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e
Activity : : create ([
’ p r o j i d ’ => $ p r o j e c t −>i d ,
’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
’ a c t i v i t y t y p e ’ => ” Data f o r SBC
Listing 16: SubreportController.php
for shallow foundation in <?php
p r o j e c t <i >$ p r o j e c t −>
p r o j n a m e </i > h a s been namespace App\ Http \ C o n t r o l l e r s ;
deleted . ”
]) ; use Auth ;
use DB;
$ f l a s h m e s s a g e = ” Data f o r SBC f o r use Input ;
shallow foundation in project use Gate ;
$ p r o j e c t −>p r o j n a m e h a s been use App\ A c t i v i t y ;
successfully deleted . ” ; use App\ D a t a P o i n t ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s . use App\ L i m i t ;
show ’ , $ p r o j e c t −>i d )−>w i t h ( ’ use App\ Sample ;
success ’ , $flash message ) ; use App\ P r o j e c t ;
} use App\ S u b r e p o r t ;
use App\ S u b r e p o r t B o d y ;
p u b l i c f u n c t i o n isUpdated ( $ p r o j i d , use I l l u m i n a t e \ Http \ R e q u e s t ;
$size of samples , $size of shallows ) use App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ;
{
$is updated = false ; c l a s s SubreportController extends Controller
{
// Check i f d a t a i s n o t y e t c r e a t e d /∗ ∗
i f ( $ s i z e o f s h a l l o w s == 0 ) { ∗ Display a l i s t i n g of the resource .
$route = route ( ’ shallows . create ’ , ∗
$proj id ) ; ∗ @return \ I l l u m i n a t e \ Http \ Response
$ f l a s h m e s s a g e = ”SBC d a t a f o r ∗/
shallow foundation i s missing public function index ( )
. <a h r e f=$ r o u t e c l a s s =’ btn {
btn−l i n k btn−sm’>Add one h e r e //
</a >. ” ; }
\ Session : : f l a s h ( ’ warning e ’ ,
$flash message ) ; /∗ ∗
return ; ∗ Show t h e f o r m for c r e a t i n g a new
} resource .
72
∗ }
∗ @return \ I l l u m i n a t e \ Http \ Response }
∗/ }
public function create () break ;
{
// case 3 : // S o i l P r o f i l e
} $sb name = ” S o i l P r o f i l e ” ;
$num of canvas = c e i l ( $project
/∗ ∗ −>p r o j n u m o f b o r e h o l e s
∗ Store a newly c r e a t e d resource in /2) ;
storage . for ( $ i = 0 ; $ i <
∗ $ n u m o f c a n v a s ; $ i ++) {
∗ @param \ I l l u m i n a t e \ Http \ Request $ f i l e p a t h = ” images /
$request s u b r e p o r t s /SP/ p r o j −
∗ @return \ I l l u m i n a t e \ Http \ Response $ p r o j e c t −>i d −$ i . png ” ;
∗/ if ( file exists ( $file path )
p u b l i c f u n c t i o n s t o r e ( Request $ r e q u e s t ) ) {
{ i f ( ! unlink ( $ f i l e p a t h
// )) {
} $ s t a t u s = ” warning
”;
/∗ ∗ }
∗ Display the s p e c i f i e d resource . else {
∗ $status = ” success
∗ @param int $id ”;
∗ @return \ I l l u m i n a t e \ Http \ Response }
∗/ }
p u b l i c f u n c t i o n show ( $ i d ) }
{ break ;
// }
}
$ s u b r e p o r t −>d e l e t e ( ) ;
/∗ ∗
∗ Show t h e f o r m f o r e d i t i n g t h e s p e c i f i e d return SubreportController : :
resource . r e c o r d D e l e t e A c t i v i t y ( $ p r o j e c t −>i d
∗ , $ s t a t u s , $sb name ) ;
∗ @param int $id }
∗ @return \ I l l u m i n a t e \ Http \ Response
∗/ public function recordDeleteActivity (
public function edit () $ p r o j i d , $ s t a t u s , $sb name )
{ {
// $project = Project : : findOrFail (
} $proj id ) ;
/∗ ∗ // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
∗ Update t h e s p e c i f i e d r e s o u r c e i n Activity : : create ([
storage . ’ p r o j i d ’ => $ p r o j e c t −>i d ,
∗ ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
∗ @param \ I l l u m i n a t e \ Http \ Request ’ a c t i v i t y t y p e ’ => ” $sb name i n
$request p r o j e c t <i >$ p r o j e c t −>
∗ @param int $id p r o j n a m e </i > h a s been
∗ @return \ I l l u m i n a t e \ Http \ Response deleted . ”
∗/ ]) ;
p u b l i c f u n c t i o n update ( Request $ r e q u e s t ,
$id ) $ f l a s h m e s s a g e = ” $sb name i n p r o j e c t
{ $ p r o j e c t −>p r o j n a m e h a s been
// successfully deleted . ” ;
} i f ( $ s t a t u s == ” w a r n i n g ” ) {
$ f l a s h m e s s a g e . ” However , an
/∗ ∗ error occurred while deleting
∗ Remove t h e s p e c i f i e d r e s o u r c e f r o m related f i l e s . ” ;
storage . }
∗ r e t u r n r e d i r e c t ( )−>r o u t e ( ’ p r o j e c t s .
∗ @param int $id show ’ , $ p r o j e c t −>i d )−>w i t h (
∗ @return \ I l l u m i n a t e \ Http \ Response $status , $flash message ) ;
∗/ }
public function destroy ( $id )
{ /∗ ∗
$subreport = Subreport : : findOrFail ( $id ∗ Display the s p e c i f i e d resource .
); ∗
$ p r o j e c t = P r o j e c t : : f i n d ( $ s u b r e p o r t −> ∗ @param int $id
proj id ) ; ∗ @return \ I l l u m i n a t e \ Http \ Response
∗/
if ( Gate : : d e n i e s ( ’ s u b r e p o r t ’ , $project p u b l i c f u n c t i o n showGSA ( $ i d )
)) { {
abort (403) ; $subreport = Subreport : : findOrFail ( $id
} );
73
’) resource .
−>j o i n ( ’ u s c s ’ , ’ s a m p l e s . u s c s i d ’ , ∗
’= ’ , ’ u s c s . i d ’ ) ∗ @return \ I l l u m i n a t e \ Http \ Response
−>where ( ’ d a t a p o i n t s . s u b r e p o r t i d ’ ∗/
, $ s u b r e p o r t −>i d ) p u b l i c f u n c t i o n createBL ( $id )
−> s e l e c t ( ’ s a m p l e s . i d ’ , ’ s a m p l e s . {
bh id ’ , ’ samples . u s c s i d ’ , ’ $matchThese = [ ’ p r o j i d ’ => $ i d , ’
uscs . uscs description ’ , ’ e n g r i d ’ => Auth : : u s e r ( )−>i d ] ;
s a m p l e s . sample num ’ , ’ s a m p l e s $ p r o j e c t = DB : : t a b l e ( ’
. sample from ’ , ’ samples . p r o j e c t e n g i n e e r s ’ )−>where (
sample to ’ , ’ samples . $matchThese )−>g e t ( ) ;
sample job num ’ , ’ samples .
s a m p l e t e s t d a t e ’ , ’ samples . i f ( sizeof ( $ p r o j e c t ) > 0) {
s a m p l e c o l o r ’ , ’ samples . l i s t ( $project , $boreholes , $counts
sample nmc percent ’ , ’ samples ) = SubreportController : :
. sample liquid limit ’ , ’ getData ( $id ) ;
samples . s a m p l e p l a s t i c l i m i t ’
, ’ samples . $ b o r e h o l e s i n f o = DB : : t a b l e ( ’
sample plasticity index ’ ) boreholes ’ )
−>groupBy ( ’ s a m p l e s . i d ’ ) −>j o i n ( ’ p r o j e c t s ’ , ’ b o r e h o l e s .
−>o r d e r B y ( ’ s a m p l e s . b h i d ’ ) p r o j i d ’ , ’= ’ , ’ p r o j e c t s .
−>o r d e r B y ( ’ s a m p l e s . i d ’ ) id ’ )
−>g e t ( ) ; −>where ( ’ b o r e h o l e s . p r o j i d ’ ,
$id )
r e t u r n v i e w ( ’ s u b r e p o r t s . showGSA ’ , −> s e l e c t ( ’ b o r e h o l e s . i d ’ , ’
array ( ’ s u b r e p o r t ’ => $ s u b r e p o r t , bh start date ’ , ’
’ p r o j e c t ’ => $ p r o j e c t , ’ s a m p l e s ’ b h e n d d a t e ’ , ’ bh num ’ , ’
=> $ s a m p l e s ) ) ; bh max depth ’ , ’
} bh weather ’ , ’ bh operator
’ , ’ bh inspector ’ , ’
/∗ ∗ bh drill rig ’ , ’
∗ Display the s p e c i f i e d resource . bh drill pump ’ , ’
∗ bh hammer weight ’ , ’
∗ @param int $id bh height of drop ’ , ’
∗ @return \ I l l u m i n a t e \ Http \ Response bh casing ’ , ’ bh rod ’ , ’
∗/ bh sampler ’ , ’
p u b l i c f u n c t i o n showLPTR ( $ i d ) bh num of samples ’ , ’
{ bh water elevation ’ , ’
$subreport = Subreport : : findOrFail ( $id bh surface elevation ’ )
); −>g e t ( ) ;
74
$subreport = Subreport : : findOrFail ( $id $ p r o j e c t −>p r o j n a m e </i >
); was c r e a t e d / updated . ”
]) ;
if ( Gate : : d e n i e s ( ’ show−s u b r e p o r t ’ ,
$ s u b r e p o r t −>p r o j e c t ) ) { $flash message = ” Soil P r o f i l e in
abort (403) ; p r o j e c t $ p r o j e c t −>p r o j n a m e
} h a s been s u c c e s s f u l l y c r e a t e d
/ updated . ” ;
$ p r o j e c t = DB : : t a b l e ( ’ p r o j e c t s ’ ) \Session : : flash ( ’ success ’ ,
−>j o i n ( ’ s u b r e p o r t s ’ , ’ p r o j e c t s . i d ’ $flash message ) ;
, ’= ’ , ’ s u b r e p o r t s . p r o j i d ’ ) r e t u r n view ( ’ s u b r e p o r t s . createSP ’ ,
−>where ( ’ p r o j e c t s . i d ’ , $ s u b r e p o r t array ( ’ p r o j e c t ’ => $ p r o j e c t ,
−>p r o j i d ) ’ b o r e h o l e s i n f o ’=>
−> s e l e c t ( ’ p r o j e c t s . i d ’ , ’ p r o j e c t s . $boreholes info , ’
proj name ’ ) s a m p l e s i n f o ’=> $ s a m p l e s i n f o
−> f i r s t ( ) ; , ’ c o u n t s ’ => $ c o u n t s ) ) ;
}
$ b o r e h o l e s i n f o = DB : : t a b l e ( ’ b o r e h o l e s else {
’) r e t u r n view ( ’ e r r o r s . 4 0 3 ’ ) ;
−>j o i n ( ’ p r o j e c t s ’ , ’ b o r e h o l e s . }
p r o j i d ’ , ’= ’ , ’ p r o j e c t s . i d ’ ) }
−>where ( ’ b o r e h o l e s . p r o j i d ’ ,
$ p r o j e c t −>i d ) /∗ ∗
−> s e l e c t ( ’ b o r e h o l e s . i d ’ , ’ ∗ Display the s p e c i f i e d resource .
bh start date ’ , ’ bh end date ’ ∗
, ’ bh num ’ , ’ bh max depth ’ , ’ ∗ @param int $id
bh weather ’ , ’ bh operator ’ , ’ ∗ @return \ I l l u m i n a t e \ Http \ Response
bh inspector ’ , ’ b h d r i l l r i g ’ ∗/
, ’ bh drill pump ’ , ’ p u b l i c f u n c t i o n showSP ( $ i d )
bh hammer weight ’ , ’ {
bh height of drop ’ , ’ $subreport = Subreport : : findOrFail ( $id
bh casing ’ , ’ bh rod ’ , ’ );
bh sampler ’ , ’ $ p r o j e c t = DB : : t a b l e ( ’ p r o j e c t s ’ )
bh num of samples ’ , ’ −>j o i n ( ’ s u b r e p o r t s ’ , ’ p r o j e c t s . i d ’
bh water elevation ’ , ’ , ’= ’ , ’ s u b r e p o r t s . p r o j i d ’ )
bh surface elevation ’ ) −>where ( ’ p r o j e c t s . i d ’ , $ s u b r e p o r t
−>g e t ( ) ; −>p r o j i d )
−> s e l e c t ( ’ p r o j e c t s . i d ’ , ’ p r o j e c t s .
r e t u r n v i e w ( ’ s u b r e p o r t s . showBL ’ , array proj name ’ , ’ p r o j e c t s .
( ’ p r o j e c t ’ => $ p r o j e c t , ’ proj num of boreholes ’ )
b o r e h o l e s i n f o ’=> $ b o r e h o l e s i n f o −> f i r s t ( ) ;
));
} r e t u r n v i e w ( ’ s u b r e p o r t s . showSP ’ , array
( ’ p r o j e c t ’ => $ p r o j e c t ) ) ;
}
/∗ ∗
∗ Show t h e f o r m f o r c r e a t i n g a new
resource . /∗ ∗
∗ ∗ S t o r e an i m a g e g e n e r a t e d i n t h e
∗ @return \ I l l u m i n a t e \ Http \ Response subreports
∗/ ∗
public function createSP ( $id ) ∗ @param
{ ∗ @return
$matchThese = [ ’ p r o j i d ’ => $ i d , ’ ∗/
e n g r i d ’ => Auth : : u s e r ( )−>i d ] ; public function storeImage ()
$ p r o j e c t = DB : : t a b l e ( ’ {
p r o j e c t e n g i n e e r s ’ )−>where ( i f ( i s s e t ( $ POST [ ’ i m a g e u r i ’ ] ) ) {
$matchThese )−>g e t ( ) ; i f ( $ POST [ ’ s b t y p e ’ ] === ’GSA ’ ) {
// V a r i a b l e s f o r s a v i n g i m a g e
i f ( sizeof ( $ p r o j e c t ) > 0) { to f o l d e r
l i s t ( $project , $boreholes , $counts $ s a m p l e i d = $ POST [ ’
) = SubreportController : : sample number ’ ] ;
getData ( $id ) ; $ f i l e p a t h = ” images /
s u b r e p o r t s /GSA/ sample−
$ b o r e h o l e s i n f o = DB : : t a b l e ( ’ $ s a m p l e i d . png ” ;
boreholes ’ ) }
−>j o i n ( ’ p r o j e c t s ’ , ’ b o r e h o l e s . e l s e i f ( $ POST [ ’ s b t y p e ’ ] === ’
p r o j i d ’ , ’= ’ , ’ p r o j e c t s . LPTR ’ ) {
id ’ ) // V a r i a b l e s f o r s a v i n g i m a g e
−>where ( ’ b o r e h o l e s . p r o j i d ’ , to f o l d e r
$id ) $ s a m p l e i d = $ POST [ ’
−> s e l e c t ( ’ b o r e h o l e s . i d ’ , ’ sample number ’ ] ;
bh num ’ , ’ bh max depth ’ , $ f i l e p a t h = ” images /
’ bh num of samples ’ , ’ s u b r e p o r t s /LPTR/ sample−
bh water elevation ’ , ’ $ s a m p l e i d . png ” ;
bh surface elevation ’ ) }
−>g e t ( ) ; e l s e i f ( $ POST [ ’ s b t y p e ’ ] == ’BL ’ )
{
$ s a m p l e s i n f o = DB : : s e l e c t ( ’SELECT // Check i f s u b r e p o r t i s
s . i d AS s a m p l e i d , b . i d AS already in the database
b h i d , u s c s i d , sample num , $matchThese = [ ’ p r o j i d ’ =>
sample from , sample to , $ POST [ ’ p r o j i d ’ ] , ’
sample num of blows , s b k e y ’ => 2 ] ;
sample type of sampling , $match = DB : : t a b l e ( ’ s u b r e p o r t s
s a m p l e r u n l e n g t h FROM ’ )−>where ( $matchThese )−>
samples s , b o r e h o l e s b , f i r s t () ;
p r o j e c t s p , u s c s WHERE s .
b h i d = b . i d AND b . p r o j i d = i f ( i s n u l l ( $match ) ) {
p . i d AND u s c s . i d = s . u s c s i d // S t o r e d a t a t o
AND p . i d = ? ORDER BY subreports table
sample from ’ , [ $id ] ) ; $input sb [ ’ sb key ’ ] = 2;
$input sb [ ’ proj id ’ ] =
// Add t h e a c t i v i t y t o a c t i v i t y $ POST [ ’ p r o j i d ’ ] ;
table $subreport = Subreport : :
Activity : : create ([ create ( $input sb ) ;
’ p r o j i d ’ => $ p r o j e c t −>i d , }
’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
’ a c t i v i t y t y p e ’ => ” S o i l // V a r i a b l e s f o r saving image
P r o f i l e i n p r o j e c t <i > to f o l d e r
75
$ b h i d = $ POST [ ’ bh number ’ ] ; i f ( ! isset ( $counts ) ) {
$ f i l e p a t h = ” images / $counts = 0;
s u b r e p o r t s /BL/bh−$ b h i d . }
png ” ;
} r e t u r n array ( $ p r o j e c t , $boreholes ,
else i f ( $ POST [ ’ s b t y p e ’ ] == ’ SP ’ ) $counts ) ;
{ }
// Check i f s u b r e p o r t i s }
already in the database
$matchThese = [ ’ p r o j i d ’ =>
$ POST [ ’ p r o j i d ’ ] , ’
s b k e y ’ => 3 ] ;
$match = DB : : t a b l e ( ’ s u b r e p o r t s
Listing 17: UserController.php
’ )−>where ( $matchThese )−> <?php
f i r s t () ;
namespace App\ Http \ C o n t r o l l e r s ;
i f ( i s n u l l ( $match ) ) {
// S t o r e d a t a t o use Auth ;
subreports table use DB;
$input sb [ ’ sb key ’ ] = 3; use Gate ;
$input sb [ ’ proj id ’ ] = use App\ A c t i v i t y ;
$ POST [ ’ p r o j i d ’ ] ; use App\ U s e r ;
$subreport = Subreport : : use I l l u m i n a t e \ Http \ R e q u e s t ;
create ( $input sb ) ; use App\ Http \ C o n t r o l l e r s \ C o n t r o l l e r ;
}
c l a s s UserController extends Controller
// V a r i a b l e s f o r s a v i n g i m a g e {
to f o l d e r /∗ ∗
$ p r o j i d = $ POST [ ’ p r o j i d ’ ] ; ∗ Display a l i s t i n g of the resource .
$canvas num = $ POST [ ’ ∗
canvas num ’ ] ; ∗ @return \ I l l u m i n a t e \ Http \ Response
$ f i l e p a t h = ” images / ∗/
s u b r e p o r t s /SP/ p r o j − public function index ( )
$ p r o j i d −$canvas num . png ” {
; $ u s e r s = U s e r : : o r d e r B y ( ’ l a s t n a m e ’ )−>
} get () ;
$ e n c o d e d d a t a = $ POST [ ’ i m a g e u r i ’ if ( Gate : : d e n i e s ( ’ manage−u s e r ’ ) ) {
]; abort (403) ;
$encoded data = s t r r e p l a c e ( ’ data : }
image / png ; b a s e 6 4 , ’ , ’ ’ ,
$encoded data ) ; r e t u r n v i e w ( ’ u s e r s . i n d e x ’ , array ( ’
$encoded data = s t r r e p l a c e ( ’ ’ , ’ u s e r s ’ => $ u s e r s ) ) ;
+’ , $encoded data ) ; }
$ d e c o d e d d a t a = base64 decode (
$encoded data ) ; /∗ ∗
$success = file put contents ( ∗ Show t h e f o r m f o r c r e a t i n g a new
$ f i l e p a t h , $decoded data ) ; resource .
echo $ s u c c e s s ? $ f i l e p a t h : ’ ∗
Unable t o s a v e t h e f i l e . ’ ; ∗ @return \ I l l u m i n a t e \ Http \ Response
} ∗/
} public function create ()
{
p u b l i c f u n c t i o n getData ( $id ) //
{ }
$project = Project : : findOrFail ( $id ) ;
/∗ ∗
$ b o r e h o l e s = DB : : t a b l e ( ’ boreholes ’ ) ∗ Store a newly c r e a t e d resource in
−>j o i n ( ’ p r o j e c t s ’ , ’ boreholes . storage .
p r o j i d ’ , ’= ’ , ’ projects . id ’ ) ∗
−>where ( ’ b o r e h o l e s . p r o j i d ’ , $id ) ∗ @param \ I l l u m i n a t e \ Http \ Request
−> s e l e c t ( ’ b o r e h o l e s . id ’ ) $request
−>g e t ( ) ; ∗ @return \ I l l u m i n a t e \ Http \ Response
∗/
if ( s i z e o f ( $ b o r e h o l e s ) > 0 ) { // I f p u b l i c f u n c t i o n s t o r e ( Request $ r e q u e s t )
t her e are b o r e h o l e s in p r o j e c t {
$i = 0; //
foreach ( $ b o r e h o l e s a s $ b o r e h o l e ) { }
$ s a m p l e s = DB : : t a b l e ( ’ s a m p l e s ’
) /∗ ∗
−>j o i n ( ’ b o r e h o l e s ’ , ’ ∗ Display the s p e c i f i e d resource .
s a m p l e s . b h i d ’ , ’= ’ , ∗
’ boreholes . id ’ ) ∗ @param int $id
−>where ( ’ s a m p l e s . b h i d ’ , ∗ @return \ I l l u m i n a t e \ Http \ Response
$ b o r e h o l e −>i d ) ∗/
−> s e l e c t ( ’ s a m p l e s . i d ’ ) p u b l i c f u n c t i o n show ( $ i d )
−>g e t ( ) ; {
$ u s e r = User : : f i n d O r F a i l ( $ i d ) ;
$ b o r e h o l e s [ $ i ] = $ b o r e h o l e −>i d
; if ( Gate : : d e n i e s ( ’ show−u s e r ’ ) ) {
$j = 0; abort (403) ;
}
i f ( s i z e o f ( $ s a m p l e s ) > 0 ) { //
I f th ere are samples in $ a c t i v i t i e s = DB : : t a b l e ( ’ a c t i v i t i e s ’ )
current borehole −> l e f t J o i n ( ’ p r o j e c t s ’ , ’ a c t i v i t i e s
foreach ( $ s a m p l e s a s . p r o j i d ’ , ’= ’ , ’ p r o j e c t s . i d ’
$sample ) { )
$counts [ $i ] [ $j ] = −>where ( ’ a c t i v i t i e s . u s e r i d ’ ,
$sample−>i d ; $ u s e r −>i d )
$ j ++; −> s e l e c t ( ’ a c t i v i t y t y p e ’ , ’ p r o j i d
} ’ , ’ proj name ’ , ’ proj image ’ ,
} ’ a c t i v i t i e s . created at ’ )
$ i ++; −>o r d e r B y ( ’ c r e a t e d a t ’ , ’ d e s c ’ )
} −>t a k e ( 1 0 )
} −>g e t ( ) ;
else {
$counts = 0; r e t u r n v i e w ( ’ u s e r s . show ’ , array ( ’ u s e r ’
} => $ u s e r , ’ a c t i v i t i e s ’ =>
$activities )) ;
76
}
$ u s e r n a m e = $ u s e r −>f i r s t n a m e . ” ” .
/∗ ∗ $ u s e r −>l a s t n a m e ;
∗ Show t h e f o r m f o r e d i t i n g t h e s p e c i f i e d
resource . return UserController : :
∗ r e c o r d D e l e t e A c t i v i t y ( $user name ) ;
∗ @param int $id }
∗ @return \ I l l u m i n a t e \ Http \ Response
∗/ public function recordDeleteActivity (
public function edit ( $id ) $user name ) {
{ // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
$ u s e r = User : : f i n d O r F a i l ( $ i d ) ; Activity : : create ([
’ p r o j i d ’ => n u l l ,
if ( Gate : : d e n i e s ( ’ e d i t −u s e r ’ , $ u s e r −> ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
id ) ) { ’ a c t i v i t y t y p e ’ => ”<i >$ u s e r n a m e
abort (403) ; </i > h a s been d e l e t e d . ”
} ]) ;
r e t u r n v i e w ( ’ u s e r s . e d i t ’ , array ( ’ u s e r ’ $ f l a s h m e s s a g e = ” $ u s e r n a m e h a s been
=> $ u s e r ) ) ; successfully deleted . ” ;
} r e t u r n r e d i r e c t ( )−>r o u t e ( ’ u s e r s . i n d e x ’
)−>w i t h ( ’ s u c c e s s ’ , $ f l a s h m e s s a g e
/∗ ∗ );
∗ Update t h e s p e c i f i e d r e s o u r c e i n }
storage .
∗ /∗ ∗
∗ @param \ I l l u m i n a t e \ Http \ Request ∗ Disable the user .
$request ∗
∗ @param int $id ∗ @param int $id
∗ @return \ I l l u m i n a t e \ Http \ Response ∗ @return \ I l l u m i n a t e \ Http \ Response
∗/ ∗/
p u b l i c f u n c t i o n update ( UpdateUserRequest p u b l i c f u n c t i o n d i s a b l e U s e r ( Request
$request , $id ) $request )
{ {
$ u s e r = User : : f i n d O r F a i l ( $ i d ) ; i f ( Gate : : d e n i e s ( ’ manage−u s e r ’ ) ) {
abort (403) ;
// V a l i d a t e t h e r e q u e s t }
$ t h i s −>v a l i d a t e ( $ r e q u e s t , [
’ f i r s t n a m e ’ => ’ r e q u i r e d | max : 2 5 5 ’ , $ u s e r = U s e r : : f i n d O r F a i l ( $ r e q u e s t −>
’ middlename ’ => ’ max : 2 5 5 ’ , user id ) ;
’ l a s t n a m e ’ => ’ r e q u i r e d | max : 2 5 5 ’ ,
’ e m a i l ’ => ’ r e q u i r e d | e m a i l | max $ u s e r −>u p d a t e ( [
: 2 5 5 | unique : users , email , ’ . ’ s t a t u s ’ => 3 ,
$ u s e r −>i d , ’ p o s i t i o n ’ => ’ D i s a b l e d U s e r ’
’ c o n t a c t ’ => ’ r e q u i r e d | max : 1 4 ’ , ]) ;
’ s e x ’ => ’ max : 1 ’ ,
’ b i r t h d a t e ’ => ’ d a t e | b e f o r e : $ u s e r n a m e = $ u s e r −>f i r s t n a m e . ” ” .
yesterday ’ , $ u s e r −>l a s t n a m e ;
’ a b o u t ’ => ’ max : 2 5 5 ’ // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
]) ; Activity : : create ([
’ p r o j i d ’ => n u l l ,
// U p d a t e u s e r i n f o r m a t i o n ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
$ u s e r −>u p d a t e ( [ ’ a c t i v i t y t y p e ’ => ”<i >$ u s e r n a m e
’ f i r s t n a m e ’ => $ r e q u e s t −>f i r s t n a m e </i > h a s been d i s a b l e d . ”
, ]) ;
’ middlename ’ => $ r e q u e s t −>
middlename , $ f l a s h m e s s a g e = ” $ u s e r n a m e h a s been
’ l a s t n a m e ’ => $ r e q u e s t −>l a s t n a m e , successfully disabled . ” ;
’ e m a i l ’ => $ r e q u e s t −>e m a i l , r e t u r n r e d i r e c t ( )−>r o u t e ( ’ u s e r s . i n d e x ’
’ c o n t a c t ’ => $ r e q u e s t −>c o n t a c t , )−>w i t h ( ’ s u c c e s s ’ , $ f l a s h m e s s a g e
’ s e x ’ => $ r e q u e s t −>s e x , );
’ b i r t h d a t e ’ => $ r e q u e s t −>b i r t h d a t e }
,
’ a b o u t ’ => $ r e q u e s t −>a b o u t /∗ ∗
]) ; ∗ Accept the pending user .
∗
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e ∗ @param int $id
Activity : : create ([ ∗ @return \ I l l u m i n a t e \ Http \ Response
’ p r o j i d ’ => n u l l , ∗/
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , p u b l i c f u n c t i o n acceptUser ( Request
’ a c t i v i t y t y p e ’ => ”<i >$ u s e r −> $request )
f i r s t n a m e $ u s e r −>l a s t n a m e </i {
>’ s u s e r p r o f i l e h a s been i f ( Gate : : d e n i e s ( ’ manage−u s e r ’ ) ) {
modified . ” abort (403) ;
]) ; }
$ u s e r = U s e r : : f i n d O r F a i l ( $ r e q u e s t −>
$ f l a s h m e s s a g e = ” Your p r o f i l e h a s user id ) ;
been s u c c e s s f u l l y m o d i f i e d . ” ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ u s e r s . show ’ , $ u s e r −>u p d a t e ( [
$ u s e r −>i d )−>w i t h ( ’ s u c c e s s ’ , ’ s t a t u s ’ => 1 ,
$flash message ) ; ’ p o s i t i o n ’ => ’ E n g i n e e r ’
} ]) ;
/∗ ∗ $ u s e r n a m e = $ u s e r −>f i r s t n a m e . ” ” .
∗ Remove t h e s p e c i f i e d r e s o u r c e f r o m $ u s e r −>l a s t n a m e ;
storage . // Add t h e a c t i v i t y t o a c t i v i t y t a b l e
∗ Activity : : create ([
∗ @param int $id ’ p r o j i d ’ => n u l l ,
∗ @return \ I l l u m i n a t e \ Http \ Response ’ u s e r i d ’ => Auth : : u s e r ( )−>i d ,
∗/ ’ a c t i v i t y t y p e ’ => ”<i >$ u s e r n a m e
public function destroy ( $id ) </i > h a s been a c c e p t e d . ”
{ ]) ;
i f ( Gate : : d e n i e s ( ’ manage−u s e r ’ ) ) {
abort (403) ; $ f l a s h m e s s a g e = ” $ u s e r n a m e h a s been
} s u c c e s s f u l l y accepted . ” ;
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ u s e r s . i n d e x ’
$ u s e r = User : : f i n d O r F a i l ( $ i d ) ; )−>w i t h ( ’ s u c c e s s ’ , $ f l a s h m e s s a g e
$ u s e r −>d e l e t e ( ) ; );
77
} Listing 19: EncryptCookies.php
/∗ ∗ <?php
∗ Update u s e r p o s i t i o n .
∗ namespace App\ Http \ M i d d l e w a r e ;
∗ @param int $id
∗ @return \ I l l u m i n a t e \ Http \ Response use I l l u m i n a t e \ Cookie \ Middleware \
∗/ EncryptCookies as BaseEncrypter ;
public function changeUserPosition ()
{ c l a s s EncryptCookies extends BaseEncrypter
i f ( Gate : : d e n i e s ( ’ manage−u s e r ’ ) ) { {
abort (403) ; /∗ ∗
} ∗ The names o f t h e c o o k i e s t h a t s h o u l d
not be encrypted .
$ i d = $ POST [ ’ i d ’ ] ; ∗
$ p o s i t i o n = $ POST [ ’ p o s i t i o n ’ ] ; ∗ @var a r r a y
$ u s e r = User : : f i n d O r F a i l ( $ i d ) ; ∗/
protected $except = [
// U p d a t e u s e r p o s i t i o n //
$ u s e r −>u p d a t e ( [ ];
’ p o s i t i o n ’ => $ p o s i t i o n }
]) ;
$ u s e r n a m e = $ u s e r −>f i r s t n a m e . ” ” .
$ u s e r −>l a s t n a m e ;
// Add t h e a c t i v i t y t o a c t i v i t y t a b l e
Listing 20: RedirectIfAuthenti-
Activity : : create ([
’ p r o j i d ’ => n u l l ,
cated.php
’ u s e r i d ’ => Auth : : u s e r ( )−>i d , <?php
’ a c t i v i t y t y p e ’ => ” U s e r <i >
$ u s e r n a m e </i >’ s p o s i t i o n h a s namespace App\ Http \ M i d d l e w a r e ;
been changed t o $ p o s i t i o n . ”
]) ; use Closure ;
u s e I l l u m i n a t e \ C o n t r a c t s \Auth\Guard ;
$ f l a s h m e s s a g e = ” $user name ’ s
p o s i t i o n h a s been changed t o class RedirectIfAuthenticated
$position . ” ; {
r e t u r n r e d i r e c t ( )−>r o u t e ( ’ u s e r s . i n d e x ’ /∗ ∗
)−>w i t h ( ’ s u c c e s s ’ , $ f l a s h m e s s a g e ∗ The Guard i m p l e m e n t a t i o n .
); ∗
} ∗ @var Guard
} ∗/
p r o t e c t e d $auth ;
/∗ ∗
Listing 18: Authenticate.php ∗ C r e a t e a new f i l t e r i n s t a n c e .
∗
<?php ∗ @param Guard $auth
∗ @return v oi d
namespace App\ Http \ M i d d l e w a r e ; ∗/
public function c o n s t r u c t ( Guard $ a u t h )
use Closure ; {
u s e I l l u m i n a t e \ C o n t r a c t s \Auth\Guard ; $ t h i s −>auth = $ a u t h ;
}
c l a s s Authenticate
{ /∗ ∗
/∗ ∗ ∗ H a n d l e an i n c o m i n g r e q u e s t .
∗ The Guard i m p l e m e n t a t i o n . ∗
∗ ∗ @param \ I l l u m i n a t e \ Http \ Request
∗ @var Guard $request
∗/ ∗ @param \ Closure $next
p r o t e c t e d $auth ; ∗ @return mixed
∗/
/∗ ∗ p u b l i c f u n c t i o n handle ( $request , Closure
∗ C r e a t e a new f i l t e r i n s t a n c e . $next )
∗ {
∗ @param Guard $auth i f ( $ t h i s −>auth−>c h e c k ( ) ) {
∗ @return v o i d r e t u r n r e d i r e c t ( ’ /home ’ ) ;
∗/ }
public function c o n s t r u c t ( Guard $ a u t h )
{ return $next ( $ r e q u e s t ) ;
$ t h i s −>auth = $ a u t h ; }
} }
/∗ ∗
∗ H a n d l e an i n c o m i n g r e q u e s t .
∗
∗ @param \ I l l u m i n a t e \ Http \ Request Listing 21: VerifyCsrfToken.php
$request
∗ @param \ Closure $next <?php
∗ @return mixed
∗/ namespace App\ Http \ M i d d l e w a r e ;
p u b l i c f u n c t i o n handle ( $request , Closure
$next ) use I l l u m i n a t e \ F o u n d a t i o n \ Http \ M i d d l e w a r e \
{ VerifyCsrfToken as B a s e V e r i f i e r ;
i f ( $ t h i s −>auth−>g u e s t ( ) ) {
i f ( $ r e q u e s t −>a j a x ( ) ) { c l a s s VerifyCsrfToken extends B a s e V e r i f i e r
return response ( ’ Unauthorized . {
’ , 401) ; /∗ ∗
} else { ∗ The URIs t h a t s h o u l d b e e x c l u d e d f r o m
r e t u r n r e d i r e c t ( )−>g u e s t ( ’ auth CSRF v e r i f i c a t i o n .
/ login ’ ) ; ∗
} ∗ @var a r r a y
} ∗/
protected $except = [
return $next ( $ r e q u e s t ) ; //
} ];
} }
78
Listing 22: StoreBoreholeRequest.php /∗ ∗
∗ Determine i f t h e user i s authorized to
<?php make t h i s r e q u e s t .
∗
namespace App\ Http \ R e q u e s t s \ B o r e h o l e ; ∗ @return b o o l
∗/
use DB; public function authorize ()
use Auth ; {
use Input ; i f ( Auth : : c h e c k ( ) ) {
use Response ; r e t u r n true ;
use I l l u m i n a t e \ F o u n d a t i o n \ Http \ FormRequest ; }
79
$ p r o j i d = Input : : get ( ’ p r o j i d ’ ) ; ∗
∗/
if ( Auth : : u s e r ( )−>i s I n P r o j e c t ( $ p r o j i d public function forbiddenResponse ()
)) { {
r e t u r n true ; r e t u r n r e s p o n s e ( )−>v i e w ( ’ e r r o r s . 4 0 3 ’ ) ;
} }
}
return false ;
}
/∗ ∗
∗ Get t h e v a l i d a t i o n r u l e s t h a t a p p l y t o
Listing 26: StoreDeepRequest.php
the request . <?php
∗
∗ @return array namespace App\ Http \ R e q u e s t s \Deep ;
∗/
public function rules () use DB;
{ use Auth ;
return [ use Input ;
’ p r o j i d ’ => ’ r e q u i r e d ’ , use Response ;
’ s a m p l e i d ’ => ’ r e q u i r e d | a r r a y ’ , use I l l u m i n a t e \ F o u n d a t i o n \ Http \ FormRequest ;
’ x i n t ’ => ’ r e q u i r e d | a r r a y ’ ,
’ y i n t ’ => ’ r e q u i r e d | a r r a y ’ , c l a s s S t o r e D e e p R e q u e s t e x t e n d s FormRequest
]; {
} /∗ ∗
∗ Determine i f t h e user i s a u t h o r i z e d to
/∗ ∗ make t h i s r e q u e s t .
∗ Send a c u s t o m r e s p o n s e on a u t h o r i z e ∗
failure ∗ @return b o o l
∗ ∗/
∗/ public function authorize ()
public function forbiddenResponse () {
{ i f ( Auth : : c h e c k ( ) ) {
r e t u r n r e s p o n s e ( )−>v i e w ( ’ e r r o r s . 4 0 3 ’ ) ; r e t u r n true ;
} }
}
$ p r o j i d = Input : : get ( ’ p r o j i d ’ ) ;
if ( Auth : : u s e r ( )−>i s I n P r o j e c t ( $ p r o j i d
Listing 25: UpdateDataPointRe- )) {
r e t u r n true ;
quest.php }
/∗ ∗
∗ Send a c u s t o m r e s p o n s e on a u t h o r i z e
failure Listing 27: UpdateDeepRequest.php
80
<?php use Response ;
u s e I l l u m i n a t e \ F o u n d a t i o n \ Http \ FormRequest ;
namespace App\ Http \ R e q u e s t s \Deep ;
class StoreDrilledShaftRequest extends
use DB; FormRequest
use Auth ; {
use Input ; /∗ ∗
use Response ; ∗ Determine i f t h e user i s authorized to
use I l l u m i n a t e \ F o u n d a t i o n \ Http \ FormRequest ; make t h i s r e q u e s t .
∗
c l a s s UpdateDeepRequest e x t e n d s FormRequest ∗ @return b o o l
{ ∗/
/∗ ∗ public function authorize ()
∗ Determine i f t h e user i s a u t h o r i z e d to {
make t h i s r e q u e s t . i f ( Auth : : c h e c k ( ) ) {
∗ r e t u r n true ;
∗ @return b o o l }
∗/
public function authorize () $ p r o j i d = Input : : get ( ’ p r o j i d ’ ) ;
{
i f ( Auth : : c h e c k ( ) ) { if ( Auth : : u s e r ( )−>i s I n P r o j e c t ( $ p r o j i d
r e t u r n true ; )) {
} r e t u r n true ;
}
$ p r o j i d = Input : : get ( ’ p r o j i d ’ ) ;
return false ;
if ( Auth : : u s e r ( )−>i s I n P r o j e c t ( $ p r o j i d }
)) {
r e t u r n true ; /∗ ∗
} ∗ Get t h e v a l i d a t i o n r u l e s t h a t a p p l y t o
the request .
return false ; ∗
} ∗ @return array
∗/
/∗ ∗ public function rules ()
∗ Get t h e v a l i d a t i o n r u l e s t h a t a p p l y t o {
the request . return [
∗ ’ p r o j i d ’ => ’ r e q u i r e d | n u m e r i c ’ ,
∗ @return array ’ b h i d ’ => ’ r e q u i r e d | a r r a y ’ ,
∗/ ’ s a m p l e i d ’ => ’ r e q u i r e d | a r r a y ’ ,
public function rules () ’ n u m o f s a m p l e s ’ => ’ r e q u i r e d |
{ array ’ ,
return [ ’ d s p i l e s i z e ’ => ’ r e q u i r e d | a r r a y ’
’ p r o j i d ’ => ’ r e q u i r e d ’ , ,
’ b h i d ’ => ’ r e q u i r e d | a r r a y ’ , ’ d s N c ’ => ’ r e q u i r e d | a r r a y ’ ,
’ s a m p l e i d ’ => ’ r e q u i r e d | a r r a y ’ , ’ d s f c o e f f ’ => ’ r e q u i r e d | a r r a y ’ ,
’ d e e p i d ’ => ’ r e q u i r e d | a r r a y ’ , ’ d s f c ’ => ’ r e q u i r e d | a r r a y ’ ,
’ n u m o f s a m p l e s ’ => ’ r e q u i r e d | ’ d s f y ’ => ’ r e q u i r e d | a r r a y ’ ,
array ’ , ’ d s s t e e l b a r d i a m e t e r ’ => ’
’ d e e p p i l e s i z e ’ => ’ r e q u i r e d | required | array ’ ,
array ’ , ’ d s f s ’ => ’ r e q u i r e d | a r r a y ’ ,
’ deep K ’ => ’ r e q u i r e d | a r r a y ’ , ’ d s t e n s i o n c a p ’ => ’ r e q u i r e d |
’ deep gamma ’ => ’ r e q u i r e d | a r r a y ’ , array ’ ,
’ d e e p t a n ’ => ’ r e q u i r e d | a r r a y ’ , ’ d s c o n c r e t e s t r e n g t h k n ’ => ’
’ d e e p f s ’ => ’ r e q u i r e d | a r r a y ’ , required | array ’ ,
’ d e e p r h o ’ => ’ r e q u i r e d | a r r a y ’ , ’ d s c o n c r e t e s t r e n g t h t o n ’ => ’
’ d e e p f y ’ => ’ r e q u i r e d | a r r a y ’ , required | array ’ ,
’ d e e p f c ’ => ’ r e q u i r e d | a r r a y ’ , ’ d s s o i l ’ => ’ r e q u i r e d | a r r a y ’ ,
’ d e e p c o n c r e t e s t r e n g t h k n ’ => ’ ’ d s c ’ => ’ r e q u i r e d | a r r a y ’ ,
required | array ’ , ’ d s Q b a s e ’ => ’ r e q u i r e d | a r r a y ’ ,
’ d e e p c o n c r e t e s t r e n g t h t o n ’ => ’ ’ d s f ’ => ’ r e q u i r e d | a r r a y ’ ,
required | array ’ , ’ d s Q f r i c t i o n ’ => ’ r e q u i r e d | a r r a y ’
’ d e e p f ’ => ’ r e q u i r e d | a r r a y ’ , ,
’ d e e p A s u r f a c e ’ => ’ r e q u i r e d | a r r a y ’ d s Q t o t a l k n ’ => ’ r e q u i r e d | a r r a y ’
’, ,
’ d e e p q ’ => ’ r e q u i r e d | a r r a y ’ , ’ d s Q t o t a l t o n ’ => ’ r e q u i r e d | a r r a y
’ d e e p A t i p ’ => ’ r e q u i r e d | a r r a y ’ , ’,
’ d e e p Q t o t a l ’ => ’ r e q u i r e d | a r r a y ’ , ’ d s i s c h o s e n ’ => ’ r e q u i r e d | a r r a y ’
’ d e e p Q k n ’ => ’ r e q u i r e d | a r r a y ’ , ];
’ d e e p Q t o n ’ => ’ r e q u i r e d | a r r a y ’ , }
’ d e e p i s c h o s e n ’ => ’ r e q u i r e d |
array ’ /∗ ∗
]; ∗ Send a c u s t o m r e s p o n s e on a u t h o r i z e
} failure
∗
/∗ ∗ ∗/
∗ Send a c u s t o m r e s p o n s e on a u t h o r i z e public function forbiddenResponse ()
failure {
∗ r e t u r n r e s p o n s e ( )−>v i e w ( ’ e r r o r s . 4 0 3 ’ ) ;
∗/ }
public function forbiddenResponse () }
{
r e t u r n r e s p o n s e ( )−>v i e w ( ’ e r r o r s . 4 0 3 ’ ) ;
}
} Listing 29: UpdateDrilledShaftRe-
quest.php
<?php
Listing 28: StoreDrilledShaftRe-
namespace App\ Http \ R e q u e s t s \ D r i l l e d S h a f t ;
quest.php
use DB;
<?php use Auth ;
use Input ;
namespace App\ Http \ R e q u e s t s \ D r i l l e d S h a f t ; use Response ;
use I l l u m i n a t e \ F o u n d a t i o n \ Http \ FormRequest ;
u s e DB;
u s e Auth ; c l a s s UpdateDrilledShaftRequest extends
use Input ; FormRequest
81
{ ∗/
/∗ ∗ public function authorize ()
∗ Determine i f t h e user i s authorized to {
make t h i s r e q u e s t . $ p r o j i d = Input : : get ( ’ p r o j i d ’ ) ;
∗ $is tagged = Project : : findOrFail (
∗ @return b o o l $ p r o j i d )−>i s T a g g e d ( ) ;
∗/
public function authorize () i f ( Auth : : c h e c k ( ) && Auth : : u s e r ( )−>
{ isAdmin ( ) && $ i s t a g g e d ) {
i f ( Auth : : c h e c k ( ) ) { r e t u r n true ;
r e t u r n true ; }
}
return false ;
$ p r o j i d = Input : : get ( ’ p r o j i d ’ ) ; }
if ( Auth : : u s e r ( )−>i s I n P r o j e c t ( $ p r o j i d /∗ ∗
)) { ∗ Get t h e v a l i d a t i o n r u l e s t h a t a p p l y t o
r e t u r n true ; the request .
} ∗
∗ @return array
return false ; ∗/
} public function rules ()
{
/∗ ∗ return [
∗ Get t h e v a l i d a t i o n r u l e s t h a t a p p l y t o ’ t o ’ => ’ r e q u i r e d | e m a i l ’ ,
the request . ’ s u b j e c t ’ => ’ r e q u i r e d ’ ,
∗ ’ m e s s a g e ’ => ’ s t r i n g ’ ,
∗ @return array ’ f i l e p a t h ’ => ’ s t r i n g ’ ,
∗/ ’ r e p o r t e x i s t s ’ => ’ min : 1 | max : 1 ’
public function rules () ];
{ }
return [
’ p r o j i d ’ => ’ r e q u i r e d ’ , /∗ ∗
’ b h i d ’ => ’ r e q u i r e d | a r r a y ’ , ∗ Get t h e v a l i d a t i o n m e s s a g e s t h a t a p p l y
’ s a m p l e i d ’ => ’ r e q u i r e d | a r r a y ’ , to the request .
’ d r i l l e d i d ’ => ’ r e q u i r e d | a r r a y ’ , ∗
’ n u m o f s a m p l e s ’ => ’ r e q u i r e d | ∗ @return array
array ’ , ∗/
’ d s p i l e s i z e ’ => ’ r e q u i r e d | a r r a y ’ p u b l i c f u n c t i o n messages ( )
, {
’ d s N c ’ => ’ r e q u i r e d | a r r a y ’ , return [
’ d s f c o e f f ’ => ’ r e q u i r e d | a r r a y ’ , ’ r e p o r t e x i s t s . min ’ => ’ R e p o r t
’ d s f c ’ => ’ r e q u i r e d | a r r a y ’ , h a s n o t been g e n e r a t e d . ’ ,
’ d s f y ’ => ’ r e q u i r e d | a r r a y ’ , ’ r e p o r t e x i s t s . max ’ => ’ R e p o r t
’ d s s t e e l b a r d i a m e t e r ’ => ’ h a s n o t been g e n e r a t e d . ’
required | array ’ , ];
’ d s f s ’ => ’ r e q u i r e d | a r r a y ’ , }
’ d s t e n s i o n c a p ’ => ’ r e q u i r e d |
array ’ , /∗ ∗
’ d s c o n c r e t e s t r e n g t h k n ’ => ’ ∗ Send a c u s t o m r e s p o n s e on a u t h o r i z e
required | array ’ , failure
’ d s c o n c r e t e s t r e n g t h t o n ’ => ’ ∗
required | array ’ , ∗/
’ d s s o i l ’ => ’ r e q u i r e d | a r r a y ’ , public function forbiddenResponse ()
’ d s c ’ => ’ r e q u i r e d | a r r a y ’ , {
’ d s Q b a s e ’ => ’ r e q u i r e d | a r r a y ’ , r e t u r n r e s p o n s e ( )−>v i e w ( ’ e r r o r s . 4 0 3 ’ ) ;
’ d s f ’ => ’ r e q u i r e d | a r r a y ’ , }
’ d s Q f r i c t i o n ’ => ’ r e q u i r e d | a r r a y ’ }
,
’ d s Q t o t a l k n ’ => ’ r e q u i r e d | a r r a y ’
,
’ d s Q t o t a l t o n ’ => ’ r e q u i r e d | a r r a y
’,
Listing 31: StoreProjectRequest.php
’ d s i s c h o s e n ’ => ’ r e q u i r e d | a r r a y ’ <?php
];
} namespace App\ Http \ R e q u e s t s \ P r o j e c t ;
/∗ ∗ use DB;
∗ Send a c u s t o m r e s p o n s e on a u t h o r i z e use Auth ;
failure use Input ;
∗ use Response ;
∗/ use I l l u m i n a t e \ F o u n d a t i o n \ Http \ FormRequest ;
public function forbiddenResponse ()
{ c l a s s S t o r e P r o j e c t R e q u e s t e x t e n d s FormRequest
r e t u r n r e s p o n s e ( )−>v i e w ( ’ e r r o r s . 4 0 3 ’ ) ; {
} /∗ ∗
} ∗ Determine i f t h e user i s a u t h o r i z e d to
make t h i s r e q u e s t .
∗
∗ @return b o o l
Listing 30: EmailRequest.php ∗/
public function authorize ()
<?php {
i f ( Auth : : c h e c k ( ) && Auth : : u s e r ( )−>
namespace App\ Http \ R e q u e s t s \ Email ; isAdmin ( ) ) {
r e t u r n true ;
use Auth ; }
use Input ;
use Response ; return false ;
use App\ P r o j e c t ; }
use I l l u m i n a t e \ F o u n d a t i o n \ Http \ FormRequest ;
/∗ ∗
c l a s s E m a i l R e q u e s t e x t e n d s FormRequest ∗ Get t h e v a l i d a t i o n r u l e s that apply to
{ the request .
/∗ ∗ ∗
∗ Determine i f t h e user i s a u t h o r i z e d to ∗ @return array
make t h i s r e q u e s t . ∗/
∗ public function rules ()
∗ @return b o o l {
82
return [ u s e Auth ;
’ p r o j n a m e ’ => ’ r e q u i r e d ’ , use Input ;
’ p r o j l o c a t i o n ’ => ’ r e q u i r e d ’ , use Response ;
’ p r o j c l i e n t ’ => ’ r e q u i r e d ’ u s e I l l u m i n a t e \ F o u n d a t i o n \ Http \ FormRequest ;
];
} c l a s s S t o r e S a m p l e R e q u e s t e x t e n d s FormRequest
{
/∗ ∗ /∗ ∗
∗ Send a c u s t o m r e s p o n s e on a u t h o r i z e ∗ Determine i f t h e user i s a u t h o r i z e d to
failure make t h i s r e q u e s t .
∗ ∗
∗/ ∗ @return b o o l
public function forbiddenResponse () ∗/
{ public function authorize ()
r e t u r n r e s p o n s e ( )−>v i e w ( ’ e r r o r s . 4 0 3 ’ ) ; {
} i f ( Auth : : c h e c k ( ) ) {
} r e t u r n true ;
}
}
r e t u r n r e s p o n s e ( )−>v i e w ( ’ e r r o r s . 4 0 3 ’ ) ; Listing 34: UpdateSampleRequest.php
} <?php
83
{ ∗ @return b o o l
/∗ ∗ ∗/
∗ Determine i f t h e user i s authorized to public function authorize ()
make t h i s r e q u e s t . {
∗ i f ( Auth : : c h e c k ( ) ) {
∗ @return b o o l r e t u r n true ;
∗/ }
public function authorize ()
{ $ p r o j i d = Input : : get ( ’ p r o j i d ’ ) ;
i f ( Auth : : c h e c k ( ) ) {
r e t u r n true ; if ( Auth : : u s e r ( )−>i s I n P r o j e c t ( $ p r o j i d
} )) {
r e t u r n true ;
$bh id = Input : : get ( ’ bh id ’ ) ; }
84
public function forbiddenResponse () use DB;
{ use Auth ;
r e t u r n r e s p o n s e ( )−>v i e w ( ’ e r r o r s . 4 0 3 ’ ) ; use Input ;
} use Response ;
} use I l l u m i n a t e \ F o u n d a t i o n \ Http \ FormRequest ;
c l a s s U p d a t e S h a l l o w R e q u e s t e x t e n d s FormRequest
{
Listing 37: StoreShallowRequest.php /∗ ∗
∗ Determine i f t h e user i s a u t h o r i z e d to
<?php make t h i s r e q u e s t .
∗
namespace App\ Http \ R e q u e s t s \ S h a l l o w ; ∗ @return b o o l
∗/
use DB; public function authorize ()
use Auth ; {
use Input ; i f ( Auth : : c h e c k ( ) ) {
use Response ; r e t u r n true ;
use I l l u m i n a t e \ F o u n d a t i o n \ Http \ FormRequest ; }
85
namespace App\ Http ; a r c h i v e ’ , ’ u s e s ’ => ’
ProjectController@archive ’ ] ) ;
use I l l u m i n a t e \ F o u n d a t i o n \ Http \ K e r n e l a s Route : : g e t ( ’ tag −{ i d } ’ , [ ’ a s ’ => ’ p r o j e c t s . t a g ’
HttpKernel ; , ’ u s e s ’ => ’ P r o j e c t C o n t r o l l e r @ t a g ’ ] ) ;
Route : : g e t ( ’ a c t i v e −{ i d } ’ , [ ’ a s ’ => ’ p r o j e c t s .
c l a s s Kernel extends HttpKernel v i e w A c t i v e ’ , ’ u s e s ’ => ’
{ ProjectController@viewActive ’ ] ) ;
/∗ ∗ Route : : g e t ( ’ a r c h i v e d ’ , [ ’ a s ’ => ’ p r o j e c t s .
∗ The a p p l i c a t i o n ’ s g l o b a l HTTP v i e w A r c h i v e d ’ , ’ u s e s ’ => ’
middleware s t a c k . ProjectController@viewArchived ’ ] ) ;
∗ Route : : g e t ( ’ c o m p i l e d −r e p o r t −{ i d } ’ , [ ’ a s ’ => ’
∗ @var a r r a y p r o j e c t s . v i e w C o m p i l e d R e p o r t ’ , ’ u s e s ’ => ’
∗/ ProjectController@viewCompiledReport ’ ] ) ;
p r o t e c t e d $middleware = [
\ I l l u m i n a t e \ F o u n d a t i o n \ Http \ M i d d l e w a r e // U s e r r o u t e s
\ CheckForMaintenanceMode : : c l a s s , Route : : r e s o u r c e ( ’ u s e r s ’ , ’ U s e r C o n t r o l l e r ’ ) ;
\App\ Http \ M i d d l e w a r e \ E n c r y p t C o o k i e s : : Route : : p o s t ( ’ u s e r s / a c c e p t ’ , [ ’ a s ’ => ’ u s e r s .
class , a c c e p t U s e r ’ , ’ u s e s ’ => ’
\ I l l u m i n a t e \ Cookie \ Middleware \ UserController@acceptUser ’ ] ) ;
AddQueuedCookiesToResponse : : c l a s s Route : : p o s t ( ’ u s e r s / d i s a b l e ’ , [ ’ a s ’ => ’ u s e r s .
, d i s a b l e U s e r ’ , ’ u s e s ’ => ’
\ I l l u m i n a t e \ S e s s i o n \ Middleware \ UserController@disableUser ’ ] ) ;
StartSession : : class , Route : : p o s t ( ’ u s e r s / change−p o s i t i o n ’ , [ ’ a s ’ =>
\ I l l u m i n a t e \ View \ M i d d l e w a r e \ ’ u s e r s . c h a n g e U s e r P o s i t i o n ’ , ’ u s e s ’ => ’
ShareErrorsFromSession : : class , UserController@changeUserPosition ’ ] ) ;
\App\ Http \ M i d d l e w a r e \ V e r i f y C s r f T o k e n : :
class , // B o r e h o l e r o u t e s
]; Route : : r e s o u r c e ( ’ b o r e h o l e s ’ , ’
B o r e h o l e C o n t r o l l e r ’ , [ ’ e x c e p t ’ => [ ’
/∗ ∗ create ’ ] ] ) ;
∗ The a p p l i c a t i o n ’ s r o u t e m i d d l e w a r e . Route : : g e t ( ’ p r o j e c t s /{ i d }/ c r e a t e ’ , [ ’ a s ’ => ’
∗ b o r e h o l e s . c r e a t e ’ , ’ u s e s ’ => ’
∗ @var a r r a y BoreholeController@create ’ ] ) ;
∗/
protected $routeMiddleware = [ // S a m p l e r o u t e s
’ auth ’ => \App\ Http \ M i d d l e w a r e \ Route : : r e s o u r c e ( ’ s a m p l e s ’ , ’ S a m p l e C o n t r o l l e r ’ ,
Authenticate : : class , [ ’ e x c e p t ’ => [ ’ c r e a t e ’ ] ] ) ;
’ auth . b a s i c ’ => \ I l l u m i n a t e \Auth\ Route : : g e t ( ’ s a m p l e s /{ i d }/ c r e a t e ’ , [ ’ a s ’ => ’
Middleware \ s a m p l e s . c r e a t e ’ , ’ u s e s ’ => ’
AuthenticateWithBasicAuth : : c l a s s , SampleController@create ’ ] ) ;
’ g u e s t ’ => \App\ Http \ M i d d l e w a r e \
RedirectIfAuthenticated : : class // E m a i l r o u t e s
]; Route : : g e t ( ’ e m a i l s /{ i d }/ c r e a t e ’ , [ ’ a s ’ => ’
} e m a i l s . c r e a t e ’ , ’ u s e s ’ => ’
EmailController@create ’ ] ) ;
Route : : p o s t ( ’ e m a i l s / s e n d ’ , [ ’ a s ’ => ’ e m a i l s .
s e n d ’ , ’ u s e s ’ => ’ E m a i l C o n t r o l l e r @ s e n d ’ ] )
Listing 41: routes.php ;
<?php // S h a l l o w ( f o u n d a t i o n ) r o u t e s
Route : : r e s o u r c e ( ’ s h a l l o w s ’ , ’ S h a l l o w C o n t r o l l e r
/∗ ’ , [ ’ e x c e p t ’ => [ ’ c r e a t e ’ , ’ i n d e x ’ , ’ show
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−’−]− ]−)−;−−−−−−−−−−−−−−−−−
Route : : g e t ( ’ s h a l l o w s /{ i d }/ c r e a t e ’ , [ ’ a s ’ => ’
| A p p l i c a t i o n Routes s h a l l o w s . c r e a t e ’ , ’ u s e s ’ => ’
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−S−h−a −l− l−
o−w−C−−o−n−t− ro−l−l−
e−
r−@− c−
r−e−ate ’ ] ) ;
Route : : g e t ( ’ s h a l l o w s /{ i d } ’ , [ ’ a s ’ => ’ s h a l l o w s
| . i n d e x ’ , ’ u s e s ’ => ’
| Here i s w h e r e you can r e g i s t e r a l l o f t h e ShallowController@index ’ ] ) ;
r o u t e s f o r an a p p l i c a t i o n . Route : : g e t ( ’ s h a l l o w s /{ i d }/ d e l e t e −c r e a t e ’ , [ ’ a s
| I t ’ s a b r e e z e . S i m p l y t e l l L a r a v e l t h e URIs ’ => ’ s h a l l o w s . d e l e t e A n d C r e a t e ’ , ’ u s e s ’
i t should respond to => ’ S h a l l o w C o n t r o l l e r @ d e l e t e A n d C r e a t e ’ ] ) ;
| and give i t the c o n t r o l l e r to call when t h a t
URI i s r e q u e s t e d . // D r i l l e d s h a f t ( f o u n d a t i o n ) r o u t e s
| Route : : r e s o u r c e ( ’ d r i l l e d s h a f t s ’ , ’
∗/ D r i l l e d S h a f t C o n t r o l l e r ’ , [ ’ e x c e p t ’ => [ ’
c r e a t e ’ , ’ i n d e x ’ , ’ show ’ ] ] ) ;
Route : : g e t ( ’ / ’ , f u n c t i o n ( ) { Route : : g e t ( ’ d r i l l e d s h a f t s /{ i d }/ c r e a t e ’ , [ ’ a s ’
i f ( Auth : : c h e c k ( ) ) { => ’ d r i l l e d s h a f t s . c r e a t e ’ , ’ u s e s ’ => ’
i f ( Auth : : u s e r ( )−>i s P e n d i n g ( ) ) { DrilledShaftController@create ’ ]) ;
Auth : : l o g o u t ( ) ; Route : : g e t ( ’ d r i l l e d s h a f t s /{ i d } ’ , [ ’ a s ’ => ’
r e t u r n r e d i r e c t ( ’ auth / l o g i n ’ )−> d r i l l e d s h a f t s . i n d e x ’ , ’ u s e s ’ => ’
w i t h ( ’ i n f o ’ , ’ Your a c c o u n t DrilledShaftController@index ’ ]) ;
n e e d s admin c o n f i r m a t i o n t o Route : : g e t ( ’ d r i l l e d s h a f t s /{ i d }/ d e l e t e −c r e a t e ’ ,
be a b l e t o l o g i n . ’ ) ; [ ’ a s ’ => ’ d r i l l e d s h a f t s . d e l e t e A n d C r e a t e ’
} , ’ u s e s ’ => ’
e l s e i f ( Auth : : u s e r ( )−>i s D i s a b l e d ( ) ) { DrilledShaftController@deleteAndCreate ’ ] )
Auth : : l o g o u t ( ) ; ;
r e t u r n r e d i r e c t ( ’ auth / l o g i n ’ )−>
w i t h ( ’ i n f o ’ , ’ Your a c c o u n t i s // Deep ( f o u n d a t i o n ) r o u t e s
disabled . ’ ) ; Route : : r e s o u r c e ( ’ d e e p s ’ , ’ D e e p C o n t r o l l e r ’ , [ ’
} e x c e p t ’ => [ ’ c r e a t e ’ , ’ i n d e x ’ , ’ show ’ ] ] ) ;
r e t u r n v i e w ( ’ welcome ’ ) ; Route : : g e t ( ’ d e e p s /{ i d }/ c r e a t e ’ , [ ’ a s ’ => ’
} d e e p s . c r e a t e ’ , ’ u s e s ’ => ’
r e t u r n r e d i r e c t ( ’ auth / l o g i n ’ ) ; DeepController@create ’ ] ) ;
}) ; Route : : g e t ( ’ d e e p s /{ i d } ’ , [ ’ a s ’ => ’ d e e p s . i n d e x
’ , ’ u s e s ’ => ’ D e e p C o n t r o l l e r @ i n d e x ’ ] ) ;
// A c t i v i t y r o u t e s Route : : g e t ( ’ d e e p s /{ i d }/ d e l e t e −c r e a t e ’ , [ ’ a s ’
Route : : g e t ( ’ a c t i v i t i e s ’ , [ ’ a s ’ => ’ a c t i v i t i e s . => ’ d e e p s . d e l e t e A n d C r e a t e ’ , ’ u s e s ’ => ’
i n d e x ’ , ’ u s e s ’ => ’ DeepController@deleteAndCreate ’ ] ) ;
ActivityController@index ’ ] ) ;
Route : : g e t ( ’ n o t i f i c a t i o n s ’ , [ ’ a s ’ => ’ // S e c t i o n r o u t e s
a c t i v i t i e s . n o t i f i c a t i o n s ’ , ’ u s e s ’ => ’ Route : : r e s o u r c e ( ’ s e c t i o n s ’ , ’ S e c t i o n C o n t r o l l e r
ActivityController@showNotifications ’ ]) ; ’ , [ ’ e x c e p t ’ => [ ’ c r e a t e ’ ] ] ) ;
Route : : p o s t ( ’ s e c t i o n s / c r e a t e ’ , [ ’ a s ’ => ’
// P r o j e c t r o u t e s s e c t i o n s . c r e a t e ’ , ’ u s e s ’ => ’
Route : : r e s o u r c e ( ’ p r o j e c t s ’ , ’ P r o j e c t C o n t r o l l e r SectionController@create ’ ]) ;
’);
Route : : g e t ( ’ a r c h i v e −{ i d } ’ , [ ’ a s ’ => ’ p r o j e c t s . // S u b r e p o r t routes
86
Route : : r e s o u r c e ( ’ s u b r e p o r t s ’ , ’
SubreportController ’ ) ; // s u b p a g e f o r t h e p o s t s f o u n d a t / admin /
Route : : p o s t ( ’ s u b r e p o r t s /{ i d }/ s t o r e −image ’ , ’ p o s t s ( app / v i e w s / admin / p o s t s . b l a d e .
SubreportController@storeImage ’ ) ; php )
Route : : g e t ( ’ p o s t s ’ , f u n c t i o n ( ) {
// GSA r o u t e s r e t u r n View : : make ( ’ admin . p o s t s ’ ) ;
Route : : g e t ( ’ s u b r e p o r t s /{ i d }/ createGSA ’ , [ ’ a s ’ }) ;
=> ’ s u b r e p o r t s . createGSA ’ , ’ u s e s ’ => ’
SubreportController@createGSA ’ ] ) ; // s u b p a g e t o c r e a t e a p o s t f o u n d a t /
Route : : g e t ( ’ s u b r e p o r t s /{ i d }/showGSA ’ , [ ’ a s ’ => admin / p o s t s / c r e a t e ( app / v i e w s / admin /
’ s u b r e p o r t s . showGSA ’ , ’ u s e s ’ => ’ p o s t s −c r e a t e . b l a d e . php )
SubreportController@showGSA ’ ] ) ; Route : : g e t ( ’ p o s t s / c r e a t e ’ , f u n c t i o n ( ) {
Route : : g e t ( ’ s u b r e p o r t s /{ i d }/ editGSA ’ , [ ’ a s ’ => r e t u r n View : : make ( ’ admin . p o s t s −c r e a t e
’ s u b r e p o r t s . editGSA ’ , ’ u s e s ’ => ’ ’) ;
SubreportController@editGSA ’ ] ) ; }) ;
Route : : p o s t ( ’ s u b r e p o r t s / storeGSA ’ , [ ’ a s ’ => ’ } ) ; ∗/
s u b r e p o r t s . storeGSA ’ , ’ u s e s ’ => ’
SubreportController@storeGSA ’ ] ) ;
// Data p o i n t r o u t e s
Route : : r e s o u r c e ( ’ d a t a p o i n t s ’ , ’
Listing 42: Helper.php
D a t a P o i n t C o n t r o l l e r ’ , [ ’ e x c e p t ’ => [ ’ <?php
c r e a t e ’ , ’ i n d e x ’ , ’ show ’ ] ] ) ;
Route : : g e t ( ’ d a t a p o i n t s /{ i d }/ c r e a t e ’ , [ ’ a s ’ => namespace App\ C u s t o m C l a s s e s ;
’ d a t a p o i n t s . c r e a t e ’ , ’ u s e s ’ => ’
DataPointController@create ’ ] ) ; use DB;
Route : : g e t ( ’ d a t a p o i n t s /{ i d } ’ , [ ’ a s ’ => ’ use DateTime ;
d a t a p o i n t s . i n d e x ’ , ’ u s e s ’ => ’ use App\ D a t a P o i n t ;
DataPointController@index ’ ] ) ; use App\ L i m i t ;
Route : : g e t ( ’ d a t a p o i n t s /{ i d }/ d e l e t e −c r e a t e ’ , [ ’ use App\ P r o j e c t ;
a s ’ => ’ d a t a p o i n t s . d e l e t e A n d C r e a t e ’ , ’ use App\ Sample ;
u s e s ’ => ’
DataPointController@deleteAndCreate ’ ] ) ; class Helper {
// LPTR r o u t e s public s t a t i c function getValue ( $old value
Route : : g e t ( ’ s u b r e p o r t s /{ i d }/ createLPTR ’ , [ ’ a s ’ , $original value ) {
=> ’ s u b r e p o r t s . createLPTR ’ , ’ u s e s ’ => ’ i f ( $ o l d v a l u e == n u l l )
SubreportController@createLPTR ’ ] ) ; $value = $ o r i g i n a l v a l u e ;
Route : : g e t ( ’ s u b r e p o r t s /{ i d }/showLPTR ’ , [ ’ a s ’ else
=> ’ s u b r e p o r t s . showLPTR ’ , ’ u s e s ’ => ’ $value = $old value ;
SubreportController@showLPTR ’ ] ) ;
return $value ;
// L i m i t r o u t e s }
Route : : r e s o u r c e ( ’ l i m i t s ’ , ’ L i m i t C o n t r o l l e r ’ , [
’ e x c e p t ’ => [ ’ c r e a t e ’ , ’ i n d e x ’ , ’ show ’ ] ] ) public static function getNotifications ()
; {
Route : : g e t ( ’ l i m i t s /{ i d }/ c r e a t e ’ , [ ’ a s ’ => ’ $ p e n d i n g u s e r s = DB : : t a b l e ( ’ u s e r s ’ )−>
l i m i t s . c r e a t e ’ , ’ u s e s ’ => ’ where ( ’ s t a t u s ’ , 0 )−>o r d e r B y ( ’
LimitController@create ’ ] ) ; c r e a t e d a t ’ , ’ d e s c ’ )−>g e t ( ) ;
Route : : g e t ( ’ l i m i t s /{ i d } ’ , [ ’ a s ’ => ’ l i m i t s . $ t a g g e d p r o j e c t s = DB : : t a b l e ( ’ p r o j e c t s
i n d e x ’ , ’ u s e s ’ => ’ L i m i t C o n t r o l l e r @ i n d e x ’ ’ )−>where ( ’ p r o j s t a t u s ’ , 1 )−>
]) ; o r d e r B y ( ’ c r e a t e d a t ’ , ’ d e s c ’ )−>
get () ;
// BL r o u t e s
Route : : g e t ( ’ s u b r e p o r t s /{ i d }/ c r e a t e B L ’ , [ ’ a s ’ r e t u r n array ( $ p e n d i n g u s e r s ,
=> ’ s u b r e p o r t s . c r e a t e B L ’ , ’ u s e s ’ => ’ $tagged projects ) ;
SubreportController@createBL ’ ] ) ; }
Route : : g e t ( ’ s u b r e p o r t s /{ i d }/showBL ’ , [ ’ a s ’ =>
’ s u b r e p o r t s . showBL ’ , ’ u s e s ’ => ’ public s t a t i c function getEngineers (
SubreportController@showBL ’ ] ) ; $proj id ) {
$ e n g i n e e r s = DB : : s e l e c t ( ’SELECT u . i d ,
// SP r o u t e s u . f i r s t n a m e , u . l a s t n a m e , u . image
Route : : g e t ( ’ s u b r e p o r t s /{ i d }/ c r e a t e S P ’ , [ ’ a s ’ FROM u s e r s u LEFT JOIN
=> ’ s u b r e p o r t s . c r e a t e S P ’ , ’ u s e s ’ => ’ p r o j e c t e n g i n e e r s pe ON u . i d = pe
SubreportController@createSP ’ ] ) ; . e n g r i d WHERE pe . p r o j i d = ? ’ , [
Route : : g e t ( ’ s u b r e p o r t s /{ i d }/ showSP ’ , [ ’ a s ’ => $proj id ]) ;
’ s u b r e p o r t s . showSP ’ , ’ u s e s ’ => ’ return $engineers ;
SubreportController@showSP ’ ] ) ; }
// A u t h e n t i c a t i o n r o u t e s . . . p u b l i c s t a t i c f u n c t i o n getMembers ( ) {
Route : : g e t ( ’ auth / l o g i n ’ , [ ’ a s ’ => ’ auth . l o g i n ’ $members = DB : : t a b l e ( ’ u s e r s ’ )−> s e l e c t (
, ’ u s e s ’ => ’ Auth\ A u t h C o n t r o l l e r @ g e t L o g i n ’ id ’ , ’ firstname ’ , ’ lastname ’ , ’
’ ]) ; image ’ )−>where ( ’ s t a t u s ’ , 1 )−>g e t
Route : : p o s t ( ’ auth / l o g i n ’ , [ ’ a s ’ => ’ auth . l o g i n () ;
’ , ’ u s e s ’ => ’ Auth\ r e t u r n $members ;
AuthController@postLogin ’ ] ) ; }
Route : : g e t ( ’ auth / l o g o u t ’ , [ ’ a s ’ => ’ auth .
l o g o u t ’ , ’ u s e s ’ => ’ Auth\ p u b l i c s t a t i c f u n c t i o n getUserName ( $ i d ) {
AuthController@getLogout ’ ] ) ; $ u s e r = DB : : t a b l e ( ’ u s e r s ’ )−> s e l e c t ( ’
f i r s t n a m e ’ , ’ l a s t n a m e ’ )−>w h e r e I d (
// R e g i s t r a t i o n r o u t e s . . . $ i d )−> f i r s t ( ) ;
Route : : g e t ( ’ auth / r e g i s t e r ’ , [ ’ a s ’ => ’ auth . $name = $ u s e r −>f i r s t n a m e . ” ” . $ u s e r
r e g i s t e r ’ , ’ u s e s ’ => ’ Auth\ −>l a s t n a m e ;
AuthController@getRegister ’ ] ) ; r e t u r n $name ;
Route : : p o s t ( ’ auth / r e g i s t e r ’ , [ ’ a s ’ => ’ auth . }
r e g i s t e r ’ , ’ u s e s ’ => ’ Auth\
AuthController@postRegister ’ ] ) ; public static function getProjects (
$engr id ) {
Route : : c o n t r o l l e r s ( [ $ p r o j e c t s = DB : : s e l e c t ( ’SELECT p . i d , p
’ p a s s w o r d ’ => ’ Auth\ P a s s w o r d C o n t r o l l e r ’ , . p r o j n a m e , p . p r o j c l i e n t FROM
]) ; p r o j e c t s p LEFT JOIN
p r o j e c t e n g i n e e r s pe ON p . i d = pe
/∗ R o u t e : : g r o u p ( a r r a y ( ’ p r e f i x ’ => ’ admin ’ ) , . p r o j i d WHERE pe . e n g r i d = ? ’ , [
function () { $engr id ]) ;
// main p a g e f o r t h e admin s e c t i o n ( app / return $projects ;
v i e w s / admin / d a s h b o a r d . b l a d e . php ) }
Route : : g e t ( ’ / ’ , f u n c t i o n ( ) {
r e t u r n View : : make ( ’ admin . d a s h b o a r d ’ ) ; public static function getSectionText (
}) ; $section id ) {
87
$ s e c t i o n = DB : : s e l e c t ( ’SELECT s e b . </b></d i v ></span><b r />” ;
s e c t i o n t e x t FROM s e c t i o n b o d i e s
s e b LEFT JOIN s e c t i o n s s e ON s e . switch ( $ s e c t i o n k e y ) {
i d = s e b . s e c t i o n i d WHERE s e b . case ” T i t l e Page ” :
section id = ? ’ , [ $section id ]) ; $ t e x t = ”<d i v s t y l e =’ t e x t −
return $section ; a l i g n : c e n t e r ;’><b>
} GEOTECHNICAL
INVESTIGATION REPORT</b
p u b l i c s t a t i c f u n c t i o n getBoreholeNum ( ></d i v><b r/>
$bh id ) { <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
$bh num = DB : : t a b l e ( ’ b o r e h o l e s ’ )−> ;’><b>FOR THE PROPOSED ” . strtoupper (
where ( ’ i d ’ , $ b h i d )−> s e l e c t ( ’ $ p r o j e c t −>p r o j n a m e ) . ”</b></d i v><b r/><
bh num ’ )−> f i r s t ( ) ; b r/><b r/>
r e t u r n $bh num−>bh num ; <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
} ;’><b>PROJECT LOCATION: </b></d i v><b r/>
<d i v s t y l e =’ t e x t −a l i g n : c e n t e r
p u b l i c s t a t i c f u n c t i o n getSectionName ( ;’><b>” . strtoupper ( $ p r o j e c t −>
$section key ) { p r o j l o c a t i o n ) . ”</b></d i v><b r/><b r/><b r
switch ( $ s e c t i o n k e y ) { />
case 0 : $ s e c t i o n n a m e = ” T i t l e <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
Page ” ; break ; ;’><b>AS PREPARED FOR</b></d i v><b r/>
case 1 : $ s e c t i o n n a m e = ” <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
I n t r o d u c t i o n ” ; break ; ;’><b>” . strtoupper ( $ p r o j e c t −>
case 2 : $ s e c t i o n n a m e = ” D r i l l i n g p r o j c l i e n t ) . ”</b></d i v><b r/><b r/><b r/>
P r o c e d u r e ” ; break ; <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
case 3 : $ s e c t i o n n a m e = ” ;’><b>PREPARED BY</b></d i v><b r/>
L a b o r a t o r y T e s t ” ; break ; <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
case 4 : $ s e c t i o n n a m e = ” S i t e ;’><b>ENGR. RESTITUTO R . ABAD JR. </b></
G e o l o g y ” ; break ; d i v>
case 5 : $ s e c t i o n n a m e = ” F i n d i n g s ” <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
; break ; ;’><b>CIVIL /FOUNDATION/STRUCTURAL ENGR. </
case 6 : $ s e c t i o n n a m e = ” b></d i v>
C o n c l u s i o n s and <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
Recommendations ” ; break ; ; ’ >PRC 62817 </ d i v>
case 7 : $ s e c t i o n n a m e = ” <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
L i m i t a t i o n s /Comments” ; break ; ; ’ >STRUCTURAL ENG ’G SPECIALIST 142</ d i v><
case 8 : $ s e c t i o n n a m e = ” Other b r/><b r/><b r/>
S e c t i o n ” ; break ; <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
d e f a u l t : $ s e c t i o n n a m e = ” ” ; break ;’><b>Member : The I n s t i t u t i o n o f
; S p e c i a l i s t S t r u c t u r a l Engr . o f t h e
} P h i l i p p i n e s ( ISSEP ) , I n c . </b></d i v><b r/><
return $section name ; b r/><b r/><b r/><b r/><b r/>
} <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
; ’ > M o b i l e Nos . : 0 9 2 3 5 0 0 0 9 8 4 / 0 9 9 8 5 3 2 6 2 0 6
public s t a t i c function getSectionKey ( / 09062838860 </ d i v>
$section name ) { <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
switch ( $ s e c t i o n n a m e ) { ; ’ > Email A d d r e s s : r a b a d j r @ y a h o o . com</d i v>
case ” T i t l e Page ” : $ s e c t i o n k e y = <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
0 ; break ; ; ’ > W e b s i t e : l a g l o b a l e d c c . com</d i v>
case ” I n t r o d u c t i o n ” : $ s e c t i o n k e y <d i v s t y l e =’ t e x t −a l i g n : c e n t e r
= 1 ; break ; ; ’ > O f f i c e A d d r e s s : 336 M a j e s t i c s t . ,
case ” D r i l l i n g P r o c e d u r e ” : Monte V i s t a Park subd . , Cainta , R i z a l </
$ s e c t i o n k e y = 2 ; break ; d i v>” ;
case ” L a b o r a t o r y T e s t ” : break ;
$ s e c t i o n k e y = 3 ; break ; case ” I n t r o d u c t i o n ” :
case ” S i t e G e o l o g y ” : $ s e c t i o n k e y $myDateTime = DateTime : :
= 4 ; break ; createFromFormat ( ’Y−m−d ’ ,
case ” F i n d i n g s ” : $ s e c t i o n k e y = 5 ; $ p r o j e c t −>
break ; proj start date ) ;
case ” C o n c l u s i o n s and $ s t a r t d a t e = $myDateTime−>
Recommendations ” : format ( ’F d , Y ’ ) ;
$ s e c t i o n k e y = 6 ; break ;
case ” L i m i t a t i o n s /Comments” : $myDateTime = DateTime : :
$ s e c t i o n k e y = 7 ; break ; createFromFormat ( ’Y−m−d ’ ,
case ” Other S e c t i o n ” : $ s e c t i o n k e y $ p r o j e c t −>p r o j e n d d a t e )
= 8 ; break ; ;
d e f a u l t : $ s e c t i o n k e y = −1; break ; $ e n d d a t e = $myDateTime−>
} format ( ’F d , Y ’ ) ;
return $section key ;
} $ t e x t = $ t e x t . ”<b l o c k q u o t e
s t y l e =’ margin : 0 0 0 40 px
p u b l i c s t a t i c f u n c t i o n getSubreportName ( ; b o r d e r : none ; p a d d i n g :
$sb key ) { 0 px;’>< d i v s t y l e =’ t e x t −
switch ( $ s b k e y ) { a l i g n : j u s t i f y ;’>< span
case 0 : $sb name = ” Gr a i n S i z e s t y l e =’ f o n t −s i z e : medium ;
A n a l y s i s ” ; break ; l i n e −h e i g h t : 1 . 4 7 1 ; ’ > The
case 1 : $sb name = ” L i q u i d and s o i l d r i l l i n g and
P l a s t i c L i m i t s Test Report ” ; sampling f o r the
break ; geotechnical
case 2 : $sb name = ” B o r e h o l e Log ” ; i n v e s t i g a t i o n at the s i t e
break ; o f t h e $ p r o j e c t −>
case 3 : $sb name = ” S o i l P r o f i l e ” ; p r o j n a m e , was u n d e r t a k e n
break ; by LA G l o b a l EDCC. The
d e f a u l t : $sb name = ” ” ; break ; eva luati on of the f i e l d
} investigation results
r e t u r n $sb name ; were p e r f o r m e d by Engr .
} R e s t i t u t o R . Abad J r . The
s o i l d r i l l i n g and
public s t a t i c function getSectionTemplate ( s a m p l i n g were c o n d u c t e d
$section key , $proj id ) { i n c l u s i v e of the dates
$project = Project : : findOrFail ( $ s t a r t d a t e to $end date
$proj id ) ; . </ span></d i v ></
$ b o r e h o l e s = P r o j e c t : : f i n d ( $ p r o j e c t −> b l o c k q u o t e >” ;
i d )−>b o r e h o l e s ; break ;
case ” D r i l l i n g P r o c e d u r e ” :
$ t e x t = ”<d i v s t y l e =’ t e x t −a l i g n : // num o f b o r e h o l e s ,
j u s t i f y ;’>< span s t y l e =’ f o n t −s i z e : bh max depth , boring
medium ; l i n e −h e i g h t : 1.471; ’ > < b> method , i n t e r v a l ,
” . strtoupper ( $ s e c t i o n k e y ) . ” bh hammer weight ,
88
bh type of sampling t h e mid−O l i g o c e n e , around 30 m i l l i o n
$ t e x t = $ t e x t . ”<b l o c k q u o t e y e a r s ago , when t h e l a n d o f mass t h a t i s
s t y l e =’ margin : 0 0 0 40 px now A u s t r a l i a s t a r t e d t o d r i f t northward ,
; b o r d e r : none ; p a d d i n g : c a u s i n g an u p l i f t i n t h e P a c i f i c s e a
0 px;’>< d i v s t y l e =’ t e x t − f l o o r . At t h e same time , a p a r t o f t h e
a l i g n : j u s t i f y ;’>< span A s i a n c o n t i n e n t a l s h e l f d r i f t e d southward
s t y l e =’ f o n t −s i z e : medium ; , c r e a t i n g t h e l a n d f o r m which now
l i n e −h e i g h t : 1.47 1; ’ > & l t c o n s i s t s o f modern day Palawan and
; b o r e h o l e s&g t ; were Mindoro I s l a n d s . The y e a r s o f t h e Miocene
d r i l l e d f o r a depth o f & e p o c h saw a r i s e i n a s e r i e s o f v o l c a n i c
l t ; d e p t h&g t ;m. & l t ; i s l a n d s i n s h a l l o w w a t e r s , and f u r t h e r
b o r i n g m e t h o d&g t ; was u s e d subduction of converging p l a t e s in the
in the d r i l l i n g . S o i l P a c i f i c form ed o t h e r l a r g e r i s l a n d s s u c h
s a m p l e s were t a k e n a t an a s V i s a y a s and Mindanao . I t was o n l y
i n t e r v a l o f 0 . 3m from a f t e r the Pilocene that the s m a l l e r
ground s u r f a c e . </ span></ i s l a n d s emerged above s e a l e v e l , f o r m i n g
d i v ></b l o c k q u o t e ><b r/> t h e c h a i n o f 7 , 0 0 0 i s l a n d s t h a t make up
t h e c o u n t r y t o d a y . The t e c t o n i c movements
<b l o c k q u o t e s t y l e =’ margin : 0 0 c a u s e d complex d e f o r m a t i o n i n t h e c r u s t
0 40 px ; b o r d e r : none ; p a d d i n g : 0 px;’>< and d e v e l o p e d movement a l o n g w i t h t h e
d i v s t y l e =’ t e x t −a l i g n : j u s t i f y ;’>< span r e s t o f t h e P h i l i p p i n e Sea P l a t e c a u s e d
s t y l e =’ f o n t −s i z e : medium ; l i n e −h e i g h t : t h e f o r m a t i o n o f l a r g e t h r u s t components
1 . 4 7 1 ; ’ > S t a n d a r d P e n e t r a t i o n T e s t s (SPT) i n t h e n o r t h e r n P h i l i p p i n e s ( Rimando e t
f o r t h e two b o r e h o l e s were c o n d u c t e d i n a l . , 2 0 0 6 ) . </ i ></span></f o n t ></d i v ></
o r d e r t o o b t a i n i n f o r m a t i o n on t h e s o i l b l o c k q u o t e ><b r/>
bearing capacity in r e l a t i o n to the
number o f blows , a s r e q u i r e d t o d r i v e t h e <b l o c k q u o t e s t y l e =’ margin : 0 0
2− i n c h o u t s i d e d i a m t e r s p l i t s p oo n 0 40 px ; b o r d e r : none ; p a d d i n g : 0 px;’><
s a m p l e r which i s b e i n g hammered d i v s t y l e =’ t e x t −a l i g n : j u s t i f y ;’>< f o n t
c o n t i n u o u s l y by a & l t ; hammerweight&g t ; kg s i z e =’3’>< span s t y l e =’ l i n e −h e i g h t : 2 3 . 5 3 6
w e i g h t . The number o f b l o w s r e q u i r e d t o px;’>< i >The c i t y o f M a n i l a r e s t s upon
d r i v e t h e s a m p l e r t h r o u g h t h e 12− i n c h a l l u v i a l d e p o s i t s from P a s i g R i v e r , which
p e n e t r a t i o n a r e r e c o r d e d a s t h e N−v a l u e i s a t i d a l e s t u a r y t h a t c o n n e c t s Laguna
o f t h e s o i l l a y e r b e i n g t e s t e d . </ span></ de Bay t o M a n i l a Bay . The d i r e c t i o n o f
d i v ></b l o c k q u o t e ><b r/> f l o w o f w a t e r d e p e n d s on t h e r e l a t i v e
w a t e r l e v e l s o f Laguna de Bay and M a n i l a
<b l o c k q u o t e s t y l e =’ margin : 0 0 Bay. </ i ></span></f o n t ></d i v ></b l o c k q u o t e
0 40 px ; b o r d e r : none ; p a d d i n g : 0 px;’>< ><b r/>
d i v s t y l e =’ t e x t −a l i g n : j u s t i f y ;’>< span
s t y l e =’ f o n t −s i z e : medium ; l i n e −h e i g h t : <b l o c k q u o t e s t y l e =’ margin : 0 0
1.4 71; ’ >& l t ; t y p e o f s a m p l i n g&g t ; i s 0 40 px ; b o r d e r : none ; p a d d i n g : 0 px;’><
employed i n hard s o i l f o r m a t i o n t o d i v s t y l e =’ t e x t −a l i g n : j u s t i f y ;’>< span
a d v a n c e t h e d r i l l r o d and t o o b t a i n r o c k s t y l e =’ l i n e −h e i g h t : 2 3 . 5 3 6 px;’>< f o n t s i z e
o r hard s o i l s a m p l e s on which l a b o r a t o r y = ’1 ’ > R e f e r e n c e 1 , S o i l r e p o r t f o r 4
t e s t s are performed to e s t a b l i s h t h e i r S t o r e y S t o . Nino Church , P a s i g GreenPark
p h y s i c a l c h a r a c t e r i s t i c s . </ span></d i v ></ V i l l a g e , Mangahan , P a s i g City </f o n t ></
b l o c k q u o t e >” ; span></d i v ></b l o c k q u o t e >
break ; <b l o c k q u o t e s t y l e =’ margin : 0 0
case ” L a b o r a t o r y T e s t ” : 0 40 px ; b o r d e r : none ; p a d d i n g : 0 px;’><
$ t e x t = $ t e x t . ”<b l o c k q u o t e d i v s t y l e =’ t e x t −a l i g n : j u s t i f y ;’>< span
s t y l e =’ margin : 0 0 0 40 px s t y l e =’ l i n e −h e i g h t : 2 3 . 5 3 6 px;’>< f o n t s i z e
; b o r d e r : none ; p a d d i n g : = ’1 ’ > R e f e r e n c e 2 , E s s e n t i a l s o f S o i l
0 px;’>< d i v s t y l e =’ t e x t − M e c h a n i c s and F o u n d a t i o n s , by David F .
a l i g n : j u s t i f y ;’>< span McCarthy</f o n t ></span></d i v ></b l o c k q u o t e >
s t y l e =’ f o n t −s i z e : medium ; <b l o c k q u o t e s t y l e =’ margin : 0 0
l i n e −h e i g h t : 1 . 4 7 1 ; ’ > A l l 0 40 px ; b o r d e r : none ; p a d d i n g : 0 px;’><
l a b o r a t o r y t e s t s were d i v s t y l e =’ t e x t −a l i g n : j u s t i f y ;’>< span
conducted in accordance s t y l e =’ l i n e −h e i g h t : 2 3 . 5 3 6 px;’>< f o n t s i z e
w i t h ASTM S t a n d a r d = ’1 ’ > R e f e r e n c e 3 , F o u n d a t i o n A n a l y s i s and
P r o c e d u r e s . </ span></d i v D e s i g n , by J o s e p h E . Bowles </f o n t ></span
></b l o c k q u o t e >” ; ></d i v ></b l o c k q u o t e >
break ; <b l o c k q u o t e s t y l e =’ margin : 0 0
case ” S i t e G e o l o g y ” : 0 40 px ; b o r d e r : none ; p a d d i n g : 0 px;’><
$ t e x t = $ t e x t . ”<b l o c k q u o t e d i v s t y l e =’ t e x t −a l i g n : j u s t i f y ;’>< span
s t y l e =’ margin : 0 0 0 40 px s t y l e =’ l i n e −h e i g h t : 2 3 . 5 3 6 px;’>< f o n t s i z e
; b o r d e r : none ; p a d d i n g : = ’1 ’ > R e f e r e n c e 4 , P i l e Foundation ,
0 px;’>< d i v s t y l e =’ t e x t − A n a l y s i s , and D e s i g n </f o n t ></span></d i v
a l i g n : j u s t i f y ;’>< f o n t ></b l o c k q u o t e >
s i z e =’3’>< span s t y l e =’ <b l o c k q u o t e s t y l e =’ margin : 0 0
l i n e −h e i g h t : 2 3 . 5 3 6 px ; ’ > 0 40 px ; b o r d e r : none ; p a d d i n g : 0 px;’><
Historical geologic d i v s t y l e =’ t e x t −a l i g n : j u s t i f y ;’>< span
b a c k g r o u n d o f Metro s t y l e =’ l i n e −h e i g h t : 2 3 . 5 3 6 px;’>< f o n t s i z e
M a n i l a and i m m e d i a t e = ’1 ’ > R e f e r e n c e 5 , N a t i o n a l S t r u c t u r a l
v i c i n i t i e s were Code o f t h e P h i l i p p i n e s , 6 t h ed . </ f o n t ></
p a r t i c u l a r l y d e s c r i b e d by span></d i v ></b l o c k q u o t e ></b l o c k q u o t e >” ;
r e f e r e n c e #1, s t a t i n g , </ break ;
span></f o n t ></d i v ></ case ” F i n d i n g s ” :
b l o c k q u o t e ><b r/> $ t e x t = $ t e x t . ”<b l o c k q u o t e
s t y l e =’ margin : 0 0 0 40 px
<b l o c k q u o t e s t y l e =’ margin : 0 0 ; b o r d e r : none ; p a d d i n g :
0 40 px ; b o r d e r : none ; p a d d i n g : 0 px;’>< 0 px;’>< d i v s t y l e =’ t e x t −
d i v s t y l e =’ t e x t −a l i g n : j u s t i f y ;’>< f o n t a l i g n : j u s t i f y ;’>< span
s i z e =’3’>< span s t y l e =’ l i n e −h e i g h t : 2 3 . 5 3 6 s t y l e =’ f o n t −s i z e : medium ;
px;’>< i >Metro M a n i l a and i t s i m m e d i a t e l i n e −h e i g h t : 1 . 4 7 1 ; ’ > The
v i c i n i t i e s u s e d t o be a submerged a r e a a t l o c a t i o n of the
one t i m e i n t h e g e o l o g i c p a s t . boreholes are r e f l e c t e d
Intermittent volcanic a c t i v i t i e s followed i n the attachment with
a f t e r w h i c h v o l c a n i c m a t e r i a l s were t h e accompanying s o i l
d e p o s i t e d . </ i ></span></f o n t ></d i v ></ p r o f i l e p l a n and b o r e h o l e
b l o c k q u o t e ><b r/> l o g s . </ span></d i v ></
b l o c k q u o t e ><b r/>” ;
<b l o c k q u o t e s t y l e =’ margin : 0 0
0 40 px ; b o r d e r : none ; p a d d i n g : 0 px;’>< foreach ( $ b o r e h o l e s a s $bh ) {
d i v s t y l e =’ t e x t −a l i g n : j u s t i f y ;’>< f o n t $ t e x t = $ t e x t . ”<
s i z e =’3’>< span s t y l e =’ l i n e −h e i g h t : 2 3 . 5 3 6 b l o c k q u o t e s t y l e =’
px;’>< i >The i s l a n d s o f t h e P h i l i p p i n e s margin : 0 0 0 40 px ;
were d e v e l o p e d t h r o u g h v o l c a n i c a c t i v i t y b o r d e r : none ; p a d d i n g
i n t h e s e a f l o o r m i l l i o n s o f y e a r s ago . : 0 px;’>< d i v s t y l e =’
The P h i l i p p i n e s f i r s t s t a r t e d t o form i n t e x t −a l i g n : j u s t i f y
89
;’>< span s t y l e =’ f o n t − // C r e a t e c o l u m n s
s i z e : medium ; l i n e − $ co l u mn s = array (
h e i g h t : 1.471; ’ > < b>At array ( ’ t y p e ’ => ’ number ’ , ’ label ’
b o r e h o l e #$bh−> => ’X ’ ) ,
bh num: </b></span></ array ( ’ t y p e ’ => ’ number ’ , ’ label ’
d i v ></b l o c k q u o t e ><b r => ” Sample $sample−>
/> sample num ” ) ,
);
<b l o c k q u o t e s t y l e =’ margin :
0 0 0 40 px ; b o r d e r : none ; p a d d i n g : 0 px $ t a b l e [ ’ c o l s ’ ] = $c o l um n s ;
;’>< d i v s t y l e =’ t e x t −a l i g n : j u s t i f y ;’>< $ t a b l e [ ’ rows ’ ] = $ r ow s ;
span s t y l e =’ f o n t −s i z e : medium ; l i n e −
h e i g h t : 1.471; ’ > Standard p e n e t r a t i o n return $table ;
t e s t s f i n d i n g s : </ span></d i v ></b l o c k q u o t e > }
90
<?php }
namespace App\ C u s t o m C l a s s e s ; /∗ ∗
∗ R e g i s t e r any application services .
use DB; ∗
use App\ B o r e h o l e ; ∗ @return v o i d
use App\ L i m i t ; ∗/
use App\ P r o j e c t ; public function register ()
use App\ Sample ; {
use App\ S e c t i o n ; //
use App\ S u b r e p o r t ; }
}
class TemplateHelper {
<?php $ g a t e −>d e f i n e ( ’ a r c h i v e −p r o j e c t ’ ,
function ( $user ) {
namespace App\ P r o v i d e r s ; r e t u r n $ u s e r −>isAdmin ( ) ;
}) ;
use I l l u m i n a t e \ Support \ S e r v i c e P r o v i d e r ;
$ g a t e −>d e f i n e ( ’ tag−p r o j e c t ’ , f u n c t i o n
class AppServiceProvider extends ( $user , $ p r o j e c t ) {
ServiceProvider r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t
{ −>i d ) ;
/∗ ∗ }) ;
∗ B o o t s t r a p any a p p l i c a t i o n services .
∗ $ g a t e −>d e f i n e ( ’ view−a c t i v e −p r o j e c t ’ ,
∗ @return v oi d f u n c t i o n ( $user , $ u s e r i d ) {
∗/ r e t u r n $ u s e r −>i d == $ u s e r i d ;
p u b l i c f u n c t i o n boot ( ) }) ;
{
// $ g a t e −>d e f i n e ( ’ view−a r c h i v e d −p r o j e c t ’ ,
91
function ( $user ) { }) ;
r e t u r n $ u s e r −>isAdmin ( ) || $ u s e r −>
isMember ( ) ; // D e e p s
}) ; $ g a t e −>d e f i n e ( ’ deep ’ , f u n c t i o n ( $ u s e r ,
$project ) {
$ g a t e −>d e f i n e ( ’ view−c o m p i l e d −r e p o r t ’ , i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) {
f u n c t i o n ( $user , $ p r o j e c t ) { return false ;
i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) { }
r e t u r n true ; r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t
} −>i d ) ;
r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t }) ;
−>i d ) ;
}) ; $ g a t e −>d e f i n e ( ’ i n d e x −deep ’ , f u n c t i o n (
$user , $ p r o j e c t ) {
// B o r e h o l e s i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) {
$ g a t e −>d e f i n e ( ’ b o r e h o l e ’ , f u n c t i o n ( r e t u r n true ;
$user , $ p r o j e c t ) { }
i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) { r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t
return false ; −>i d ) ;
} }) ;
r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t
−>i d ) ; // D r i l l e d S h a f t s
}) ; $ g a t e −>d e f i n e ( ’ d r i l l e d −s h a f t ’ ,
f u n c t i o n ( $user , $ p r o j e c t ) {
$ g a t e −>d e f i n e ( ’ show−b o r e h o l e ’ , i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) {
f u n c t i o n ( $user , $ p r o j e c t ) { return false ;
i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) { }
r e t u r n true ; r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t
} −>i d ) ;
r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t }) ;
−>i d ) ;
}) ; $ g a t e −>d e f i n e ( ’ i n d e x −d r i l l e d −s h a f t ’ ,
f u n c t i o n ( $user , $ p r o j e c t ) {
// S a m p l e s i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) {
$ g a t e −>d e f i n e ( ’ s a m p l e ’ , f u n c t i o n ( r e t u r n true ;
$user , $borehole ) { }
i f ( $ b o r e h o l e −>p r o j e c t −>i s A r c h i v e d r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t
() ) { −>i d ) ;
return false ; }) ;
}
r e t u r n $ u s e r −>i s I n P r o j e c t 2 ( // S h a l l o w s
$ b o r e h o l e −>i d ) ; $ g a t e −>d e f i n e ( ’ s h a l l o w ’ , f u n c t i o n (
}) ; $user , $ p r o j e c t ) {
i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) {
// Data p o i n t s return false ;
$ g a t e −>d e f i n e ( ’ data−p o i n t ’ , f u n c t i o n ( }
$user , $ p r o j e c t ) { r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t
i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) { −>i d ) ;
return false ; }) ;
}
r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t $ g a t e −>d e f i n e ( ’ i n d e x −s h a l l o w ’ ,
−>i d ) ; f u n c t i o n ( $user , $ p r o j e c t ) {
}) ; i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) {
r e t u r n true ;
$ g a t e −>d e f i n e ( ’ i n d e x −data−p o i n t ’ , }
f u n c t i o n ( $user , $ p r o j e c t ) { r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t
i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) { −>i d ) ;
r e t u r n true ; }) ;
}
r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t // S e c t i o n s
−>i d ) ; $ g a t e −>d e f i n e ( ’ s e c t i o n ’ , f u n c t i o n (
}) ; $user , $ p r o j e c t ) {
i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) {
// L i m i t s return false ;
$ g a t e −>d e f i n e ( ’ l i m i t ’ , f u n c t i o n ( $ u s e r }
, $project ) { r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t
i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) { −>i d ) ;
return false ; }) ;
}
r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t $ g a t e −>d e f i n e ( ’ show−s e c t i o n ’ , f u n c t i o n
−>i d ) ; ( $user , $ p r o j e c t ) {
}) ; i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) {
r e t u r n true ;
$ g a t e −>d e f i n e ( ’ i n d e x −l i m i t ’ , f u n c t i o n }
( $user , $ p r o j e c t ) { r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t
i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) { −>i d ) ;
r e t u r n true ; }) ;
}
r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t // U s e r s
−>i d ) ; $ g a t e −>d e f i n e ( ’ manage−u s e r ’ , function
}) ; ( $user ) {
r e t u r n $ u s e r −>isAdmin ( ) ;
// S u b r e p o r t s }) ;
$ g a t e −>d e f i n e ( ’ s u b r e p o r t ’ , f u n c t i o n (
$user , $ p r o j e c t ) { $ g a t e −>d e f i n e ( ’ e d i t −u s e r ’ , f u n c t i o n (
i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) { $user , $ u s e r i d ) {
return false ; r e t u r n $ u s e r −>i d == $ u s e r i d ;
} }) ;
r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t
−>i d ) ; $ g a t e −>d e f i n e ( ’ show−u s e r ’ , f u n c t i o n (
}) ; $user ) {
r e t u r n $ u s e r −>isAdmin ( ) | | $ u s e r −>
$ g a t e −>d e f i n e ( ’ show−s u b r e p o r t ’ , isMember ( ) ;
f u n c t i o n ( $user , $ p r o j e c t ) { }) ;
i f ( $ p r o j e c t −>i s A r c h i v e d ( ) ) {
r e t u r n true ; // E m a i l s
} $ g a t e −>d e f i n e ( ’ e m a i l ’ , f u n c t i o n ( $user
r e t u r n $ u s e r −>i s I n P r o j e c t ( $ p r o j e c t , $project ) {
−>i d ) ; i f ( $ p r o j e c t −>i s T a g g e d ( ) ) {
92
r e t u r n true ; public function boot ( Router $ r o u t e r )
} {
r e t u r n $ u s e r −>isAdmin ( ) ; //
}) ;
parent : : boot ( $ r o u t e r ) ;
// A c t i v i t i e s }
$ g a t e −>d e f i n e ( ’ show− a c t i v i t i e s ’ ,
function ( $user ) { /∗ ∗
r e t u r n Auth : : c h e c k ( ) ; ∗ Define the routes for the a p p l i c a t i o n .
}) ; ∗
∗ @param \ I l l u m i n a t e \ Routing \ Router
$ g a t e −>d e f i n e ( ’ show−n o t i f i c a t i o n s ’ , $router
function ( $user ) { ∗ @return v o i d
r e t u r n $ u s e r −>isAdmin ( ) ; ∗/
}) ; p u b l i c f u n c t i o n map ( R o u t e r $ r o u t e r )
} {
} $ r o u t e r −>g r o u p ( [ ’ namespace ’ => $ t h i s −>
namespace ] , f u n c t i o n ( $ r o u t e r ) {
r e q u i r e a p p p a t h ( ’ Http / r o u t e s . php ’
);
Listing 46: EventServiceProvider.php }
}) ;
<?php }
namespace App\ P r o v i d e r s ;
93
| class ,
∗/ I l l u m i n a t e \ Routing \
ControllerServiceProvider : : class ,
’ l o c a l e ’ => ’ en ’ , I l l u m i n a t e \ Cookie \
CookieServiceProvider : : class ,
/∗ I l l u m i n a t e \ Database \
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− D−− a−ta−b−−a−
s e−S −e−r−v−i−
c−e−
P−r−
ovider : : class ,
I l l u m i n a t e \ Encryption \
| Application Fallback Locale EncryptionServiceProvider : : class ,
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− I l−l−u−−−
m i n−a−t−e−\−F
−− i l−e−s−y−s−
t−
e−m−\−
FilesystemServiceProvider : : class ,
| I l l u m i n a t e \ Foundation \ P r o v i d e r s \
| The f a l l b a c k l o c a l e d e t e r m i n e s t h e FoundationServiceProvider : : class ,
l o c a l e t o u s e when t h e c u r r e n t one I l l u m i n a t e \ Hashing \ H a s h S e r v i c e P r o v i d e r
| i s n o t a v a i l a b l e . You may c h a n g e t h e : : class ,
v a l u e t o c o r r e s p o n d t o any o f I l l u m i n a t e \ Mail \ M a i l S e r v i c e P r o v i d e r : :
| the language f o l d e r s t h a t are provided class ,
through your a p p l i c a t i o n . Illuminate \ Pagination \
| PaginationServiceProvider : : class ,
∗/ Illuminate\ Pipeline \
PipelineServiceProvider : : class ,
’ f a l l b a c k l o c a l e ’ => ’ en ’ , I l l u m i n a t e \Queue\ Q u e u e S e r v i c e P r o v i d e r
: : class ,
/∗ I l l u m i n a t e \ Redis \ R e d i s S e r v i c e P r o v i d e r
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−:− :− c−l−
a−s−s−,−−−−−−−−−−
I l l u m i n a t e \Auth\ P a s s w o r d s \
| E n c r y p t i o n Key PasswordResetServiceProvider : :
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− c−l−a−s−s− ,−−−−−−−−−−−−
Illuminate \Session\
| SessionServiceProvider : : class ,
| This key i s used by t h e I l l u m i n a t e Illuminate \ Translation \
e n c r y p t e r s e r v i c e and s h o u l d b e s e t TranslationServiceProvider : : class
| t o a random , 32 c h a r a c t e r s t r i n g , ,
otherwise these encrypted s t r i n g s Illuminate \ Validation \
| w i l l n o t b e s a f e . P l e a s e do t h i s b e f o r e ValidationServiceProvider : : class ,
d e p l o y i n g an a p p l i c a t i o n ! I l l u m i n a t e \ View \ V i e w S e r v i c e P r o v i d e r : :
| class ,
∗/
/∗
’ key ’ => env ( ’APP KEY ’ , ’ SomeRandomString ’ ∗ Application Service Providers . . .
), ∗/
App\ P r o v i d e r s \ A p p S e r v i c e P r o v i d e r : :
’ c i p h e r ’ => ’AES−256−CBC ’ , class ,
App\ P r o v i d e r s \ A u t h S e r v i c e P r o v i d e r : :
/∗ class ,
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−App\ −−−−− P− r−o−v−id−−e−
r s−\ −E−−v−e−n−t−
S−e−
rviceProvider : :
class ,
| Logging Configuration App\ P r o v i d e r s \ R o u t e S e r v i c e P r o v i d e r : :
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− c−l−a−s−s− ,−−−−−−−−−−−−
| C o l l e c t i v e \Html\ H t m l S e r v i c e P r o v i d e r : :
| Here you may c o n f i g u r e t h e l o g s e t t i n g s class
f o r y o u r a p p l i c a t i o n . Out o f
| t h e b o x , L a r a v e l u s e s t h e Monolog PHP ],
l o g g i n g l i b r a r y . This g i v e s
| you a v a r i e t y o f p o w e r f u l l o g h a n d l e r s / /∗
formatters to u t i l i z e . |−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
|
| Available Settings : ” single ” , ” daily ” , ” | Class Aliases
syslog ”, ” errorlog ” |−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
|
∗/ |
|
This array o f c l a s s a l i a s e s w i l l be
’ l o g ’ => ’ s i n g l e ’ , r e g i s t e r e d when t h i s a p p l i c a t i o n
|
i s s t a r t e d . However , f e e l f r e e t o
/∗ r e g i s t e r a s many a s you w i s h a s
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| −−
th−e−−− a−l i−a−s−e−s−−a−r−e−−”−l−a−z−y−”−−l−
oaded so they
don ’ t h i n d e r p e r f o r m a n c e .
| Autoloaded Service Providers |
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
∗/−−−−−−−−−−−−−−−−−−−−−−−−−
| ’ a l i a s e s ’ => [
| The s e r v i c e p r o v i d e r s l i s t e d h e r e w i l l
b e a u t o m a t i c a l l y l o a d e d on t h e ’ App ’ => I l l u m i n a t e \ S u p p o r t \
| r e q u e s t to your a p p l i c a t i o n . Feel f r e e F a c a d e s \App : : c l a s s ,
t o add y o u r own s e r v i c e s t o ’ Artisan ’ => I l l u m i n a t e \ S u p p o r t \
| t h i s array to grant expanded Facades \ A r t i s a n : : c l a s s ,
f u n c t i o n a l i t y to your a p p l i c a t i o n s . ’ Auth ’ => I l l u m i n a t e \ S u p p o r t \
| F a c a d e s \Auth : : c l a s s ,
∗/ ’ Blade ’ => I l l u m i n a t e \ S u p p o r t \
Facades \ Blade : : c l a s s ,
’ p r o v i d e r s ’ => [ ’ Bus ’ => I l l u m i n a t e \ S u p p o r t \
F a c a d e s \Bus : : c l a s s ,
/∗ ’ Cache ’ => I l l u m i n a t e \ S u p p o r t \
∗ L a r a v e l Framework S e r v i c e P r o v i d e r s F a c a d e s \ Cache : : c l a s s ,
... ’ Config ’ => I l l u m i n a t e \ S u p p o r t \
∗/ Facades \ Config : : c l a s s ,
I l l u m i n a t e \ Foundation \ P r o v i d e r s \ ’ Cookie ’ => I l l u m i n a t e \ S u p p o r t \
ArtisanServiceProvider : : class , Facades \ Cookie : : c l a s s ,
I l l u m i n a t e \Auth\ A u t h S e r v i c e P r o v i d e r : : ’ Crypt ’ => I l l u m i n a t e \ S u p p o r t \
class , F a c a d e s \ Crypt : : c l a s s ,
Illuminate \ Broadcasting \ ’DB ’ => I l l u m i n a t e \ S u p p o r t \
BroadcastServiceProvider : : class , F a c a d e s \DB : : c l a s s ,
I l l u m i n a t e \Bus\ B u s S e r v i c e P r o v i d e r : : ’ E l o q u e n t ’ => I l l u m i n a t e \ D a t a b a s e \
class , E l o q u e n t \ Model : : c l a s s ,
I l l u m i n a t e \ Cache \ C a c h e S e r v i c e P r o v i d e r ’ Event ’ => I l l u m i n a t e \ S u p p o r t \
: : class , F a c a d e s \ Event : : c l a s s ,
I l l u m i n a t e \ Foundation \ P r o v i d e r s \ ’ File ’ => I l l u m i n a t e \ S u p p o r t \
ConsoleSupportServiceProvider : : Facades \ F i l e : : c l a s s ,
94
’ Gate ’ => I l l u m i n a t e \ S u p p o r t \ ,
F a c a d e s \ Gate : : c l a s s ,
’ Hash ’ => I l l u m i n a t e \ S u p p o r t \ /∗
F a c a d e s \Hash : : c l a s s , |−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
’ Input ’ => I l l u m i n a t e \ S u p p o r t \
Facades \ Input : : c l a s s , | Database Connections
’ I n s p i r i n g ’ => I l l u m i n a t e \ F o u n d a t i o n \ |−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
Inspiring : : class ,
’ Lang ’ => I l l u m i n a t e \ S u p p o r t \ |
F a c a d e s \ Lang : : c l a s s , | Here a r e e a c h o f t h e d a t a b a s e
’ Log ’ => I l l u m i n a t e \ S u p p o r t \ c o n n e c t i o n s s e t u p f o r your
F a c a d e s \ Log : : c l a s s , application .
’ Mail ’ => I l l u m i n a t e \ S u p p o r t \ | Of c o u r s e , e x a m p l e s o f c o n f i g u r i n g e a c h
Facades \ Mail : : c l a s s , database platform that is
’ Password ’ => I l l u m i n a t e \ S u p p o r t \ | s u p p o r t e d b y L a r a v e l i s shown b e l o w t o
F a c a d e s \ Password : : c l a s s , make d e v e l o p m e n t s i m p l e .
’ Queue ’ => I l l u m i n a t e \ S u p p o r t \ |
F a c a d e s \Queue : : c l a s s , |
’ R e d i r e c t ’ => I l l u m i n a t e \ S u p p o r t \ | A l l d a t a b a s e work i n L a r a v e l i s done
Facades \ R e d i r e c t : : c l a s s , t h r o u g h t h e PHP PDO f a c i l i t i e s
’ Redis ’ => I l l u m i n a t e \ S u p p o r t \ | s o make s u r e you h a v e t h e d r i v e r f o r
Facades \ Redis : : c l a s s , your p a r t i c u l a r d a t a b a s e o f
’ Request ’ => I l l u m i n a t e \ S u p p o r t \ | c h o i c e i n s t a l l e d on y o u r m a c h i n e b e f o r e
Facades \ Request : : c l a s s , you b e g i n d e v e l o p m e n t .
’ R e s p o n s e ’ => I l l u m i n a t e \ S u p p o r t \ |
Facades \ Response : : c l a s s , ∗/
’ Route ’ => I l l u m i n a t e \ S u p p o r t \
F a c a d e s \ Route : : c l a s s , ’ c o n n e c t i o n s ’ => [
’ Schema ’ => I l l u m i n a t e \ S u p p o r t \
F a c a d e s \Schema : : c l a s s , ’ s q l i t e ’ => [
’ Session ’ => I l l u m i n a t e \ S u p p o r t \ ’ driver ’ => ’ sqlite ’ ,
Facades \ S e s s i o n : : c l a s s , ’ d a t a b a s e ’ => storage path ( ’
’ Storage ’ => I l l u m i n a t e \ S u p p o r t \ database . sqlite ’) ,
Facades \ Storage : : c l a s s , ’ prefix ’ => ’’,
’URL ’ => I l l u m i n a t e \ S u p p o r t \ ],
F a c a d e s \URL : : c l a s s ,
’ V a l i d a t o r ’ => I l l u m i n a t e \ S u p p o r t \ ’ mysql ’ => [
Facades \ V a l i d a t o r : : c l a s s , ’ driver ’ => ’ mysql ’ ,
’ View ’ => I l l u m i n a t e \ S u p p o r t \ ’ host ’ => ’ localhost ’ ,
F a c a d e s \ View : : c l a s s , ’ d a t a b a s e ’ => ’ g i n −r g ’ ,
’ username ’ => ’ root ’ ,
’ Form ’ => C o l l e c t i v e \Html\ ’ p a s s w o r d ’ => ’’,
FormFacade : : c l a s s , ’ charset ’ => ’ utf8 ’ ,
’ Html ’ => C o l l e c t i v e \Html\ ’ c o l l a t i o n ’ => ’ utf8 unicode ci ’ ,
HtmlFacade : : c l a s s , ’ prefix ’ => ’’,
’ Helper ’ => App\ C u s t o m C l a s s e s \ ’ strict ’ => false ,
Helper : : c l a s s , ],
’ TemplateHelper ’ => App\
CustomClasses \ TemplateHelper : : ’ p g s q l ’ => [
class ’ driver ’ => ’ pgsql ’ ,
’ host ’ => env ( ’DB HOST ’ , ’
localhost ’) ,
], ’ d a t a b a s e ’ => env ( ’DB DATABASE ’ , ’
forge ’ ) ,
]; ’ username ’ => env ( ’DB USERNAME ’ , ’
forge ’ ) ,
’ p a s s w o r d ’ => env ( ’DB PASSWORD ’ , ’
’) ,
Listing 49: database.php ’ c h a r s e t ’ =>
’ prefix ’ =>
’ utf8 ’ ,
’’,
<?php ’ schema ’ => ’ public ’ ,
],
return [
’ s q l s r v ’ => [
/∗ ’ driver ’ => ’ s q l s r v ’ ,
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− ’−h−o−s t−−’ −−−−− =−>−−env
−−−(−’DB HOST ’ , ’
localhost ’ ) ,
| PDO F e t c h S t y l e ’ d a t a b a s e ’ = > env ( ’DB DATABASE ’ , ’
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− f−
o−r−g− e−’−
)−,−−−−−−
’ username ’ => env ( ’DB USERNAME ’ , ’
| forge ’ ) ,
| By d e f a u l t , d a t a b a s e r e s u l t s w i l l b e ’ p a s s w o r d ’ => env ( ’DB PASSWORD ’ , ’
r e t u r n e d a s i n s t a n c e s o f t h e PHP ’) ,
| s t d C l a s s o b j e c t ; h o w e v e r , you may d e s i r e ’ c h a r s e t ’ => ’ u t f 8 ’ ,
t o r e t r i e v e r e c o r d s i n an ’ prefix ’ => ’ ’ ,
| a r r a y f o r m a t f o r s i m p l i c i t y . Here you ],
can t w e a k the fetch style .
| ],
∗/
/∗
’ f e t c h ’ => PDO : : FETCH CLASS , |−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
| D e f a u l t D a t a b a s e C o n n e c t i o n Name |
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− | −−
T−h−i−
s −−
ta−−b− l e−−−ke−e−p−s−−t−r−a−c−k−−o
−f a l l t h e
m i g r a t i o n s t h a t have a l r e a d y run f o r
| | your a p p l i c a t i o n . Using t h i s information
| Here you may s p e c i f y w h i c h o f t h e , we can d e t e r m i n e w h i c h o f
d a t a b a s e c o n n e c t i o n s b e l o w you w i s h | t h e m i g r a t i o n s on d i s k h a v e n ’ t a c t u a l l y
| to use as your d e f a u l t connection f o r b een run i n t h e d a t a b a s e .
a l l d a t a b a s e w o r k . Of c o u r s e |
| you may u s e many c o n n e c t i o n s a t o n c e ∗/
using the Database library .
| ’ m i g r a t i o n s ’ => ’ m i g r a t i o n s ’ ,
∗/
/∗
’ d e f a u l t ’ => env ( ’DB CONNECTION ’ , ’ mysql ’ ) |−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
95
| Redis Databases /∗ ∗
|−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−∗ −−The
−−−−− a−t−
t r−i−b−u−t−e−s−−t−h−a−t−−a
−r−e− g u a r d e d .
∗
| ∗ @var a r r a y
| R e d i s i s an o p e n s o u r c e , f a s t , and ∗/
a d v a n c e d k e y−v a l u e s t o r e t h a t a l s o p r o t e c t e d $guarded = [ ’ i d ’ ] ;
| p r o v i d e s a r i c h e r s e t o f commands t h a n a
t y p i c a l k e y −v a l u e s y s t e m s /∗ ∗
| s u c h a s APC o r Memcached . L a r a v e l makes ∗ Get t h e p r o j e c t t h a t owns t h e b o r e h o l e .
i t easy to dig r i g h t in . ∗/
| public function project ()
∗/ {
r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ P r o j e c t ’ ,
’ r e d i s ’ => [ ’ proj id ’ ) ;
}
’ c l u s t e r ’ => f a l s e ,
/∗ ∗
’ d e f a u l t ’ => [ ∗ Get t h e s a m p l e s o f t h e b o r e h o l e .
’ host ’ => ’ 1 2 7 . 0 . 0 . 1 ’ , ∗/
’ port ’ => 6 3 7 9 , p u b l i c f u n c t i o n samples ( )
’ d a t a b a s e ’ => 0 , {
], r e t u r n $ t h i s −>hasMany ( ’ App\ Sample ’ , ’
bh id ’ ) ;
], }
]; /∗ ∗
∗ Get t h e SBC f o r s h a l l o w f o u n d a t i o n o f
the borehole .
∗/
Listing 50: Activity.php public function shallows ()
{
<?php r e t u r n $ t h i s −>hasMany ( ’ App\ S h a l l o w ’ , ’
bh id ’ ) ;
namespace App ; }
use I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ; /∗ ∗
∗ Get t h e SBC f o r d e e p f o u n d a t i o n o f the
c l a s s A c t i v i t y e x t e n d s Model borehole .
{ ∗/
/∗ ∗ p u b l i c f u n c t i o n deeps ( )
∗ The d a t a b a s e t a b l e u s e d b y t h e model . {
∗ r e t u r n $ t h i s −>hasMany ( ’ App\Deep ’ , ’
∗ @var s t r i n g bh id ’ ) ;
∗/ }
protected $table = ’ a c t i v i t i e s ’ ;
/∗ ∗
/∗ ∗ ∗ Get t h e SBC f o r d r i l l e d s h a f t
∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e foundation of the borehole .
. ∗/
∗ public function drilledShafts ()
∗ @var a r r a y {
∗/ r e t u r n $ t h i s −>hasMany ( ’ App\
protected $ f i l l a b l e = [ ’ proj id ’ , ’ user id DrilledShaft ’ , ’ bh id ’ ) ;
’ , ’ activity type ’ ] ; }
/∗ ∗ }
∗ The a t t r i b u t e s t h a t a r e g u a r d e d .
∗
∗ @var a r r a y
∗/
p r o t e c t e d $guarded = [ ’ i d ’ ] ;
Listing 52: DataPoint.php
} <?php
namespace App ;
<?php c l a s s D a t a P o i n t e x t e n d s Model
{
namespace App ; /∗ ∗
∗ The d a t a b a s e t a b l e u s e d b y t h e model .
use I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ; ∗
∗ @var s t r i n g
c l a s s B o r e h o l e e x t e n d s Model ∗/
{ protected $table = ’ data points ’ ;
/∗ ∗
∗ The d a t a b a s e t a b l e u s e d b y t h e model . /∗ ∗
∗ ∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e
∗ @var s t r i n g .
∗/ ∗
protected $table = ’ boreholes ’ ; ∗ @var a r r a y
∗/
/∗ ∗ protected $ f i l l a b l e = [ ’ sample id ’ , ’
∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e subreport id ’ , ’ x int ’ , ’ y int ’ ] ;
.
∗ /∗ ∗
∗ @var a r r a y ∗ The a t t r i b u t e s t h a t a r e g u a r d e d .
∗/ ∗
protected $ f i l l a b l e = [ ’ proj id ’ , ’ ∗ @var a r r a y
bh start date ’ , ’ bh end date ’ , ’ ∗/
bh num ’ , ’ b h n u m o f s a m p l e s ’ , ’ p r o t e c t e d $guarded = [ ’ i d ’ ] ;
bh max depth ’ , ’ b h w e a t h e r ’ , ’
bh operator ’ , ’ bh inspector ’ , ’ /∗ ∗
b h d r i l l r i g ’ , ’ bh drill pump ’ , ’ ∗ Get t h e s a m p l e t h a t owns t h e d a t a .
bh hammer weight ’ , ’ b h h e i g h t o f d r o p ∗/
’ , ’ bh casing ’ , ’ bh rod ’ , ’ bh sampler p u b l i c f u n c t i o n sample ( )
’ , ’ bh water elevation ’ , ’ {
bh surface elevation ’ ] ; r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ Sample ’ ,
96
’ sample id ’ ) ; ∗ @var a r r a y
} ∗/
protected $ f i l l a b l e = [ ’ proj i d ’ , ’ bh id ’ ,
} ’ sample id ’ , ’ d s s o i l ’ , ’
d s p i l e s i z e ’ , ’ ds Nc ’ , ’ ds f coeff ’ ,
’ ds fc ’ , ’ ds fy ’ , ’
ds steel bar diameter ’ , ’ ds fs ’ , ’
Listing 53: Deep.php ds tension cap ’ , ’ ds c ’ ,
’ ds f ’ , ’ ds Qfriction ’ ,
’ ds Qbase ’ ,
’ ds Qtotal kn
<?php ’ , ’ ds Qtotal ton ’ , ’
ds concrete strength kn ’ , ’
namespace App ; ds concrete strength ton ’, ’
ds is chosen ’ ] ;
use I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ;
/∗ ∗
c l a s s Deep e x t e n d s Model ∗ The a t t r i b u t e s t h a t a r e g u a r d e d .
{ ∗
/∗ ∗ ∗ @var a r r a y
∗ The d a t a b a s e t a b l e u s e d b y the model . ∗/
∗ p r o t e c t e d $guarded = [ ’ i d ’ ] ;
∗ @var s t r i n g
∗/ /∗ ∗
protected $ t a b l e = ’ deeps ’ ; ∗ Get t h e p r o j e c t t h a t owns t h e d a t a .
∗/
/∗ ∗ public function project ()
∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e {
. r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ P r o j e c t ’ ,
∗ ’ proj id ’ ) ;
∗ @var a r r a y }
∗/
protected $ f i l l a b l e = [ ’ p r o j i d ’ , ’ bh id ’ , /∗ ∗
’ sample id ’ , ’ d e e p p i l e s i z e ’ , ’ ∗ Get t h e b o r e h o l e t h a t owns t h e d a t a .
deep K ’ , ’ deep gamma ’ , ’ d e e p t a n ’ , ’ ∗/
deep fs ’ , ’ deep rho ’ , ’ deep fy ’ , ’ public function borehole ()
deep fc ’ , ’ deep f ’ , ’ deep Asurface ’ , {
’ deep q ’ , ’ deep Atip ’ , ’ deep Qtotal ’ , r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ B o r e h o l e ’
’ deep Q kn ’ , ’ deep Q ton ’ , ’ , ’ bh id ’ ) ;
deep concrete strength kn ’ , ’ }
deep concrete strength ton ’ , ’
deep is chosen ’ ] ; /∗ ∗
∗ Get t h e s a m p l e t h a t owns t h e d a t a .
/∗ ∗ ∗/
∗ The a t t r i b u t e s t h a t a r e g u a r d e d . p u b l i c f u n c t i o n samples ( )
∗ {
∗ @var a r r a y r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ Sample ’ ,
∗/ ’ sample id ’ ) ;
p r o t e c t e d $guarded = [ ’ i d ’ ] ; }
}
/∗ ∗
∗ Get t h e p r o j e c t t h a t owns t h e d a t a .
∗/
public function project () Listing 55: Limit.php
{
r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ P r o j e c t ’ , <?php
’ proj id ’ ) ;
} namespace App ;
/∗ ∗ use I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ;
∗ Get t h e b o r e h o l e t h a t owns t h e d a t a .
∗/ c l a s s L i m i t e x t e n d s Model
public function borehole () {
{ /∗ ∗
r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ B o r e h o l e ’ ∗ The d a t a b a s e t a b l e u s e d b y the model .
, ’ bh id ’ ) ; ∗
} ∗ @var s t r i n g
∗/
/∗ ∗ protected $table = ’ limits ’ ;
∗ Get t h e s a m p l e t h a t owns t h e d a t a .
∗/ /∗ ∗
p u b l i c f u n c t i o n samples ( ) ∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e
{ .
r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ Sample ’ , ∗
’ sample id ’ ) ; ∗ @var a r r a y
} ∗/
} protected $ f i l l a b l e = [ ’ sample id ’ , ’
s u b r e p o r t i d ’ , ’ lim run num ’ , ’
l i m t e s t ’ , ’ lim num of blows ’ , ’
lim water content ’ ] ;
Listing 54: DrilledShaft.php /∗ ∗
<?php ∗ The a t t r i b u t e s t h a t a r e g u a r d e d .
∗
namespace App ; ∗ @var a r r a y
∗/
use I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ; p r o t e c t e d $guarded = [ ’ i d ’ ] ;
c l a s s D r i l l e d S h a f t e x t e n d s Model /∗ ∗
{ ∗ Get t h e s a m p l e t h a t owns t h e d a t a .
/∗ ∗ ∗/
∗ The d a t a b a s e t a b l e u s e d b y t h e m o d e l . p u b l i c f u n c t i o n samples ( )
∗ {
∗ @var s t r i n g r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ Sample ’ ,
∗/ ’ sample id ’ ) ;
protected $table = ’ d r i l l e d s h a f t s ’ ; }
}
/∗ ∗
∗ The a t t r i b u t e s that a r e mass assignable
.
∗ Listing 56: Project.php
97
<?php ∗ Get t h e SBC f o r s h a l l o w f o u n d a t i o n o f
the project .
namespace App ; ∗/
public function shallows ()
use I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ; {
r e t u r n $ t h i s −>hasMany ( ’ App\ S h a l l o w ’ , ’
c l a s s P r o j e c t e x t e n d s Model proj id ’ ) ;
{ }
/∗ ∗
∗ The d a t a b a s e t a b l e u s e d b y t h e model . /∗ ∗
∗ ∗ Get t h e SBC f o r d e e p f o u n d a t i o n o f the
∗ @var s t r i n g project .
∗/ ∗/
protected $table = ’ projects ’ ; p u b l i c f u n c t i o n deeps ( )
{
/∗ ∗ r e t u r n $ t h i s −>hasMany ( ’ App\Deep ’ , ’
∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e proj id ’ ) ;
. }
∗
∗ @var a r r a y /∗ ∗
∗/ ∗ Get t h e SBC f o r d r i l l e d s h a f t
p r o t e c t e d $ f i l l a b l e = [ ’ proj name ’ , ’ foundation of the project .
proj description ’ , ’ proj location ’ , ’ ∗/
proj client ’ , ’ proj num of boreholes ’ public function drilledShafts ()
, ’ proj start date ’ , {
’ proj end date ’ , r e t u r n $ t h i s −>hasMany ( ’ App\
’ proj date signed ’ , ’ proj status ’ ] ; DrilledShaft ’ , ’ proj id ’ ) ;
}
/∗ ∗
∗ The a t t r i b u t e s t h a t a r e g u a r d e d .
∗ }
∗ @var a r r a y
∗/
p r o t e c t e d $guarded = [ ’ i d ’ ] ;
/∗ ∗
Listing 57: Sample.php
∗ Checks i f p r o j e c t i s a c t i v e <?php
∗/
public function isActive () namespace App ;
{
i f ( $ t h i s −>p r o j s t a t u s == 0 ) { use I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ;
r e t u r n true ;
} c l a s s Sample e x t e n d s Model
{
return false ; /∗ ∗
} ∗ The d a t a b a s e t a b l e u s e d b y the model .
∗
/∗ ∗ ∗ @var s t r i n g
∗ Checks i f p r o j e c t i s t a g g e d ∗/
∗/ protected $ t a b l e = ’ samples ’ ;
p u b l i c f u n c t i o n isTagged ( )
{ /∗ ∗
i f ( $ t h i s −>p r o j s t a t u s == 1 ) { ∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e
r e t u r n true ; .
} ∗
∗ @var a r r a y
return false ; ∗/
} protected $ f i l l a b l e = [ ’ bh id ’ , ’ us cs id ’ ,
’ sample num ’ , ’ s a m p l e f r o m ’ , ’
/∗ ∗ sample to ’ , ’ sample contract num ’ , ’
∗ Checks i f p r o j e c t i s a r c h i v e d sample job num ’ ,
∗/ ’
public function isArchived () sample color ’ , ’ sample run length ’ , ’
{ sample sample length ’ , ’
i f ( $ t h i s −>p r o j s t a t u s == 2 ) { sample rec percent ’ , ’
r e t u r n true ; sample nmc percent ’ , ’
} sample num of blows ’ , ’
sample liquid limit ’ , ’
return false ; sample plastic limit ’ , ’
} sample plasticity index ’ , ’
sample plasticity remark ’ , ’
/∗ ∗ sample tester ’ , ’
∗ Get t h e b o r e h o l e s o f t h e p r o j e c t . sample type of sampling ’ ,
∗/ ’
public function boreholes () sample test date ’ , ’
{ sample other results ’ ] ;
r e t u r n $ t h i s −>hasMany ( ’ App\ B o r e h o l e ’ ,
’ proj id ’ ) ; /∗ ∗
} ∗ The a t t r i b u t e s t h a t a r e g u a r d e d .
∗
/∗ ∗ ∗ @var a r r a y
∗ Get t h e s e c t i o n s o f t h e p r o j e c t . ∗/
∗/ p r o t e c t e d $guarded = [ ’ i d ’ ] ;
public function sections ()
{ /∗ ∗
r e t u r n $ t h i s −>hasMany ( ’ App\ S e c t i o n ’ , ’ ∗ Get t h e b o r e h o l e t h a t owns t h e s a m p l e .
proj id ’ ) ; ∗/
} public function borehole ()
{
/∗ ∗ r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ B o r e h o l e ’
∗ Get t h e s u b r e p o r t s o f t h e p r o j e c t . , ’ bh id ’ ) ;
∗/ }
public function subreports ()
{ /∗ ∗
r e t u r n $ t h i s −>hasMany ( ’ App\ S u b r e p o r t ’ , ∗ Get t h e d a t a p o i n t s o f t h e s a m p l e .
’ proj id ’ ) ; ∗/
} public function dataPoints ()
{
/∗ ∗ r e t u r n $ t h i s −>hasMany ( ’ App\ D a t a P o i n t ’ ,
98
’ sample id ’ ) ; c l a s s S e c t i o n B o d y e x t e n d s Model
} {
/∗ ∗
/∗ ∗ ∗ The d a t a b a s e t a b l e u s e d b y t h e m o d e l .
∗ Get t h e SBC f o r s h a l l o w f o u n d a t i o n o f ∗
the sample . ∗ @var s t r i n g
∗/ ∗/
public function shallow () protected $table = ’ section bodies ’ ;
{
r e t u r n $ t h i s −>hasOne ( ’ App\ S h a l l o w ’ , ’ /∗ ∗
sample id ’ ) ; ∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e
} .
∗
/∗ ∗ ∗ @var a r r a y
∗ Get t h e SBC f o r d e e p f o u n d a t i o n o f t h e ∗/
sample . protected $ f i l l a b l e = [ ’ section id ’ , ’
∗/ section text ’ ] ;
p u b l i c f u n c t i o n deep ( )
{ /∗ ∗
r e t u r n $ t h i s −>hasOne ( ’ App\Deep ’ , ’ ∗ The a t t r i b u t e s t h a t a r e g u a r d e d .
sample id ’ ) ; ∗
} ∗ @var a r r a y
∗/
/∗ ∗ p r o t e c t e d $guarded = [ ’ i d ’ ] ;
∗ Get t h e SBC f o r d r i l l e d s h a f t }
fo und ati on of the sample .
∗/
public function drilledShaft ()
{ Listing 60: Shallow.php
r e t u r n $ t h i s −>hasOne ( ’ App\ D r i l l e d S h a f t
’ , ’ sample id ’ ) ; <?php
}
namespace App ;
}
use I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ;
c l a s s S h a l l o w e x t e n d s Model
{
Listing 58: Section.php /∗ ∗
∗ The d a t a b a s e t a b l e u s e d b y t h e model .
<?php
∗
∗ @var s t r i n g
namespace App ;
∗/
protected $table = ’ shallows ’ ;
use I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ;
/∗ ∗
c l a s s S e c t i o n e x t e n d s Model
∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e
{
.
/∗ ∗
∗
∗ The d a t a b a s e t a b l e u s e d b y t h e model .
∗ @var a r r a y
∗
∗/
∗ @var s t r i n g
protected $ f i l l a b l e = [ ’ p r o j i d ’ , ’ bh id ’ ,
∗/
’ sample id ’ , ’ s h a l l o w s o i l ’ , ’
protected $table = ’ sections ’ ;
shallow c ’ , ’ shallow B ’ , ’ shallow phi
’ , ’ s h a l l o w N c ’ , ’ shallow Ngamma ’ , ’
/∗ ∗
s h a l l o w N q ’ , ’ shallow gamma1 ’ , ’
∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e
shallow gamma2 ’ , ’ s h a l l o w f s ’ , ’
.
shallow qult ’ , ’ shallow q ’ , ’
∗
shallow is chosen ’ ] ;
∗ @var a r r a y
∗/
/∗ ∗
protected $ f i l l a b l e = [ ’ proj id ’ , ’
∗ The a t t r i b u t e s t h a t a r e g u a r d e d .
section key ’ ] ;
∗
∗ @var a r r a y
/∗ ∗
∗/
∗ The a t t r i b u t e s t h a t a r e g u a r d e d .
p r o t e c t e d $guarded = [ ’ i d ’ ] ;
∗
∗ @var a r r a y
/∗ ∗
∗/
∗ Get t h e p r o j e c t t h a t owns t h e d a t a .
p r o t e c t e d $guarded = [ ’ i d ’ ] ;
∗/
public function project ()
/∗ ∗
{
∗ Get t h e p r o j e c t t h a t owns t h e s e c t i o n .
r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ P r o j e c t ’ ,
∗/
’ proj id ’ ) ;
public function project ()
}
{
r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ P r o j e c t ’ ,
/∗ ∗
’ proj id ’ ) ;
∗ Get t h e b o r e h o l e t h a t owns t h e d a t a .
}
∗/
public function borehole ()
/∗ ∗
{
∗ Get t h e ( b o d y ) s e c t i o n s o f t h e p r o j e c t .
r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ B o r e h o l e ’
∗/
, ’ bh id ’ ) ;
public function sectionBody ()
}
{
r e t u r n $ t h i s −>hasOne ( ’ App\ S e c t i o n B o d y ’
/∗ ∗
, ’ section id ’) ;
∗ Get t h e s a m p l e t h a t owns t h e d a t a .
}
∗/
}
p u b l i c f u n c t i o n samples ( )
{
r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ Sample ’ ,
’ sample id ’ ) ;
Listing 59: SectionBody.php }
}
<?php
namespace App ;
Listing 61: Subreport.php
use I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ;
<?php
99
/∗ ∗
namespace App ; ∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e
.
use I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ; ∗
∗ @var a r r a y
c l a s s S u b r e p o r t e x t e n d s Model ∗/
{ protected $ f i l l a b l e = [ ’ firstname ’ , ’
/∗ ∗ middlename ’ , ’ l a s t n a m e ’ , ’ e m a i l ’ , ’
∗ The d a t a b a s e t a b l e u s e d b y t h e model . contact ’ , ’ p o s i t i o n ’ , ’ status ’ , ’ sex ’
∗ , ’ b i r t h d a t e ’ , ’ a b o u t ’ , ’ image ’ , ’
∗ @var s t r i n g password ’ ] ;
∗/
protected $table = ’ subreports ’ ; /∗ ∗
∗ The a t t r i b u t e s t h a t a r e g u a r d e d .
/∗ ∗ ∗
∗ The a t t r i b u t e s t h a t a r e mass a s s i g n a b l e ∗ @var a r r a y
. ∗/
∗ p r o t e c t e d $guarded = [ ’ i d ’ ] ;
∗ @var a r r a y
∗/ /∗ ∗
protected $ f i l l a b l e = [ ’ p r o j i d ’ , ’ sb key ’ ∗ The a t t r i b u t e s e x c l u d e d f r o m t h e model ’
]; s JSON f o r m .
∗
/∗ ∗ ∗ @var a r r a y
∗ The a t t r i b u t e s t h a t a r e g u a r d e d . ∗/
∗ p r o t e c t e d $hidden = [ ’ password ’ , ’
∗ @var a r r a y remember token ’ ] ;
∗/
p r o t e c t e d $guarded = [ ’ i d ’ ] ;
public f u n c t i o n isAdmin ( )
/∗ ∗ {
∗ Get t h e p r o j e c t t h a t owns t h e s e c t i o n . if ( $ t h i s −>s t a t u s == 2 ) {
∗/ r e t u r n true ;
public function project () }
{
r e t u r n $ t h i s −>b e l o n g s T o ( ’ App\ P r o j e c t ’ , return false ;
’ proj id ’ ) ; }
}
public f u n c t i o n isMember ( )
/∗ ∗ {
∗ Get t h e d a t a p o i n t s o f t h e s u b r e p o r t . if ( $ t h i s −>s t a t u s == 1 ) {
∗/ r e t u r n true ;
public function dataPoints () }
{
r e t u r n $ t h i s −>hasMany ( ’ App\ D a t a P o i n t ’ , return false ;
’ subreport id ’ ) ; }
}
public function isPending ()
/∗ ∗ {
∗ Get t h e d a t a p o i n t s o f t h e s u b r e p o r t . if ( $ t h i s −>s t a t u s == 0 ) {
∗/ r e t u r n true ;
public function limits () }
{
r e t u r n $ t h i s −>hasMany ( ’ App\ L i m i t ’ , ’ return false ;
subreport id ’ ) ; }
}
public function isDisabled ()
{
} if ( $ t h i s −>s t a t u s == 3 ) {
r e t u r n true ;
}
<?php
/∗ ∗
namespace App ; ∗ Check i f u s e r i s i n a p r o j e c t u s i n g
project id .
u s e DB; ∗/
u s e I l l u m i n a t e \Auth\ A u t h e n t i c a t a b l e ; public function isInProject ( $proj id )
u s e I l l u m i n a t e \ D a t a b a s e \ E l o q u e n t \ Model ; {
u s e I l l u m i n a t e \Auth\ P a s s w o r d s \ CanResetPassword $matchThese = [ ’ p r o j i d ’ => $ p r o j i d ,
; ’ e n g r i d ’ => $ t h i s −>i d ] ;
u s e I l l u m i n a t e \ F o u n d a t i o n \Auth\ A c c e s s \ $ p r o j e c t = DB : : t a b l e ( ’
Authorizable ; p r o j e c t e n g i n e e r s ’ )−>where (
u s e I l l u m i n a t e \ C o n t r a c t s \Auth\ A u t h e n t i c a t a b l e $matchThese )−>g e t ( ) ;
as AuthenticatableContract ;
u s e I l l u m i n a t e \ C o n t r a c t s \Auth\ A c c e s s \ i f ( sizeof ( $ p r o j e c t ) > 0) {
Authorizable as AuthorizableContract ; r e t u r n true ;
u s e I l l u m i n a t e \ C o n t r a c t s \Auth\ CanResetPassword }
as CanResetPasswordContract ;
return false ;
class U s e r e x t e n d s Model i m p l e m e n t s }
AuthenticatableContract ,
a c∗t
A u t h o r i z a b l e C o n t r/∗
, ∗ Check i f u s e r i s i n a p r o j e c t u s i n g
CanResetPasswordContrab c to r e h o l e i d .
∗/
{ public function i s I n P r o j e c t 2 ( $bh id )
use Authenticatable , Authorizable , {
CanResetPassword ; $matchThese = [ ’ b o r e h o l e s . i d ’ =>
$bh id , ’ p r o j e c t e n g i n e e r s .
/∗ ∗ e n g r i d ’ => $ t h i s −>i d ] ;
∗ The d a t a b a s e t a b l e u s e d b y t h e m o d e l . $ p r o j e c t = DB : : t a b l e ( ’
∗ project engineers ’ )
∗ @var s t r i n g −>j o i n ( ’ b o r e h o l e s ’ , ’
∗/ project engineers . proj id ’ , ’
protected $table = ’ users ’ ; =’ , ’ boreholes . proj id ’ )
−>where ( $matchThese )−>g e t ( ) ;
100
?>
i f ( sizeof ( $ p r o j e c t ) > 0) {
r e t u r n true ; {!!
} $activity
−>
return false ; activity type
}
} !!}
</h2>
<d i v c l a s s
Listing 63: activities/index.blade.php =”
byline
@extends ( ’ l a y o u t s / m a s t e r ’ ) ”>
@ s e c t i o n ( ’ t i t l e ’ , ’ Audit T r a i l ’ ) <span>
@section ( ’ content ’ )
<d i v c l a s s=” row ”> {{
<d i v c l a s s=” c o l −md−12 c o l −sm−12 c o l −xs −12”
> Helper
<d i v c l a s s=” x p a n e l ”> ::
<d i v c l a s s=” x t i t l e ”> getTimeElapsedStrin
<h2> Audit T r a i l <s m a l l >View (
u s e r a c t i v i t i e s </s m a l l > $activity
</h2> −>
<u l c l a s s=” nav navbar−r i g h t created at
p a n e l t o o l b o x ”> )
< l i ><a c l a s s=” c o l l a p s e −
l i n k ”><i c l a s s=” f a f a }}
−c h e v r o n−up”></i ></a>
</ l i > </
< l i c l a s s=” dropdown ”> span
<a h r e f=”#” c l a s s=” >
dropdown−t o g g l e ” by
data−t o g g l e=” @if (
dropdown ” r o l e=” $activity
button ” aria − −>
expanded=” f a l s e ” user id
><i c l a s s=” f a f a −
wrench ”></i ></a> !=
<u l c l a s s=” dropdown−
menu” r o l e=”menu” NULL
> )
< l i ><a h r e f=”#”> {!!
S e t t i n g s 1</a link to route
> (
</ l i > ’
< l i ><a h r e f=”#”> users
S e t t i n g s 2</a .
> show
</ l i > ’
</u l > ,
</ l i >
</u l > $user name
<d i v c l a s s=” c l e a r f i x ”></d i v> ,
</d i v>
<d i v c l a s s=” x c o n t e n t ”> $activity
−>
@ i f ( s i z e o f ( $ a c t i v i t i e s ) == 0 ) user id
<c e n t e r ><h2>There a r e no )
a c t i v i t i e s . </h2></c e n t e r >
@else !!}
<d i v c l a s s=” dashboard−w i d g e t −
c o n t e n t ”> @else
<u l c l a s s=” l i s t −u n s t y l e d Deactivated
t i m e l i n e w i d g e t ”>
@foreach ( $ a c t i v i t i e s user
as $ a c t i v i t y )
<l i > @endif
<d i v c l a s s=” b l o c k ” </d i v>
> <p c l a s s=”
<d i v c l a s s=” excerpt
block content ”></p
”> >
<h2 c l a s s= </d i v>
” </d i v>
title </ l i >
”> @endforeach
<?php </u l >
$user name <c e n t e r > { ! ! $ a c t i v i t i e s −>
r e n d e r ( ) !!} </ c e n t e r >
= </d i v>
@endif
$activity
−> <d i v c l a s s=” l n s o l i d ”></d i v>
firstname </d i v>
</d i v>
. </d i v>
</d i v>
”
@endsection
”
.
Listing 64: activities/notifica-
$activity
−> tions.blade.php
lastname
; @extends ( ’ l a y o u t s / m a s t e r ’ )
@section ( ’ t i t l e ’ , ’ N o t i f i c a t i o n s ’ )
101
@section ( ’ content ’ ) getTimeElapsedStrin
<!−− p e n d i n g u s e r s −−> (
<d i v c l a s s=” row ”> $user
<d i v c l a s s=” c o l −md−6 c o l −sm−6 c o l −xs −12”> −>
<d i v c l a s s=” x p a n e l ”> created at
<d i v c l a s s=” x t i t l e ”> )
<h2> Pending U s e r s <s m a l l >
Newly−r e g i s t e r e d u s e r s </ }}</
s m a l l ></h2> span
<u l c l a s s=” nav navbar−r i g h t >
p a n e l t o o l b o x ”> </d i v>
< l i ><a c l a s s=” c o l l a p s e − <p c l a s s=”
l i n k ”><i c l a s s=” f a f a excerpt
−c h e v r o n−up”></i ></a> ”>
</ l i > <l a b e l
< l i c l a s s=” dropdown ”> >
<a h r e f=”#” c l a s s=” Email
dropdown−t o g g l e ” : </
data−t o g g l e=” label
dropdown ” r o l e=” >
button ” aria −
expanded=” f a l s e ” {{
><i c l a s s=” f a f a −
wrench ”></i ></a> $user
<u l c l a s s=” dropdown− −>
menu” r o l e=”menu” email
>
< l i ><a h r e f=”#”> }}
S e t t i n g s 1</a
> <
</ l i > br
< l i ><a h r e f=”#”> />
S e t t i n g s 2</a
> <l a b e l
</ l i > >
</u l > Contact
</ l i >
</u l > No
<d i v c l a s s=” c l e a r f i x ”></d i v> .: </
</d i v> label
<d i v c l a s s=” x c o n t e n t ”> >
@ i f ( s i z e o f ( $ p e n d i n g u s e r s ) ==
0) {{
<c e n t e r ><h2>There a r e no
p e n d i n g u s e r s . </h2></ $user
center> −>
@else contact
<d i v c l a s s=” dashboard−w i d g e t −
c o n t e n t ”> }}
102
S e t t i n g s 1</a
> <l a b e l
</ l i > >
< l i ><a h r e f=”#”> Location
S e t t i n g s 2</a : </
> label
</ l i > >
</u l >
</ l i > {{
</u l >
<d i v c l a s s=” c l e a r f i x ”></d i v> $proj
</d i v> −>
<d i v c l a s s=” x c o n t e n t ”> proj location
@if ( sizeof ( $ t a g g e d p r o j e c t s )
== 0 ) }}
<c e n t e r ><h2>There a r e no
t a g g e d p r o j e c t s . </h2></ <
center> br
@else />
<d i v c l a s s=” dashboard−w i d g e t −
c o n t e n t ”> </p>
</d i v>
<u l c l a s s=” l i s t −u n s t y l e d </d i v>
t i m e l i n e w i d g e t ”> </ l i >
@foreach ( @endforeach
$tagged projects </u l >
as $proj ) <c e n t e r ><a h r e f=” {{ r o u t e
<l i > ( ’ p r o j e c t s . index ’) .
<d i v c l a s s=” b l o c k ” ’# t a g g e d p r o j e c t s ’ }}
> ” c l a s s=” btn btn−
<d i v c l a s s=” p r i m a r y ”><i c l a s s=” f a
block content f a −t a s k s ”></i >
”> Manage Tagged
<h2 c l a s s= P r o j e c t s </a></c e n t e r
” >
title
”><a </d i v>
h r e f= @endif
” {{
route </d i v>
(’ </d i v>
projects </d i v>
. show </d i v>
’, <!−− / t a g g e d p r o j e c t s −−>
$proj
−>i d ) @endsection
}} ”
>{{
$proj
−>
proj name
Listing 65: auth/login.blade.php
}}</ <!DOCTYPE html>
a></ <html l a n g=” en ”>
h2>
<d i v c l a s s <head>
=” <meta h t t p−e q u i v=” Content−Type ” c o n t e n t=”
byline t e x t / html ; c h a r s e t=UTF−8”>
”> <!−− Meta , t i t l e , CSS , f a v i c o n s , e t c . −−>
Last <meta c h a r s e t=” u t f −8”>
m o d i f i e d<meta h t t p−e q u i v=”X−UA−C o m p a t i b l e ” c o n t e n t
=” IE=e d g e ”>
< <meta name=” v i e w p o r t ” c o n t e n t=” w i d t h=
span d e v i c e −width , i n i t i a l −s c a l e =1”>
>{{
< t i t l e >Login </ t i t l e >
Helper
:: <!−− B o o t s t r a p c o r e CSS −−>
getTimeElapsedString
( <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / b o o t s t r a p .
$user min . c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
−>
c r e a t e d <l
a t i n k h r e f=” {{ URL : : a s s e t ( ’ f o n t s / c s s / f o n t −
) awesome . min . c s s ’ ) }} ” r e l =” s t y l e s h e e t
”>
}}</ <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / a n i m a t e . min
span . c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
>
</d i v> <!−− Custom s t y l i n g p l u s p l u g i n s −−>
<p c l a s s=” <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / custom . c s s
excerpt ’ ) }} ” r e l =” s t y l e s h e e t ”>
”> <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / i c h e c k / f l a t
<l a b e l / g r e e n . c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
>
C l i e n t < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / j q u e r y . min .
: </ j s ’ ) }} ”></ s c r i p t >
l a b e</head>
l
>
<body s t y l e=” b a c k g r o u n d :#F7F7F7 ; ”>
{{
<d i v c l a s s=” ”>
$proj
−> @if ( s e s s i o n ( ’ e r r o r ’ ) )
p r o j c l i e n t <d i v c l a s s=” a l e r t a l e r t −d a n g e r ” r o l e=”
a l e r t ”>
}} <span c l a s s=” g l y p h i c o n g l y p h i c o n −
e x c l a m a t i o n −s i g n ” a r i a −h i d d e n
< =” t r u e ”></span>
br {{ s e s s i o n ( ’ e r r o r ’ ) }}
/> </d i v>
103
@endif to register
@if ( s e s s i o n ( ’ i n f o ’ ) ) ’)) !!}
<d i v c l a s s=” a l e r t a l e r t −i n f o ” r o l e=” </p>
a l e r t ”> <d i v c l a s s=”
<span c l a s s=” g l y p h i c o n g l y p h i c o n − c l e a r f i x ”></
e x c l a m a t i o n −s i g n ” a r i a −h i d d e n d i v>
=” t r u e ”></span> <b r />
{{ s e s s i o n ( ’ i n f o ’ ) }} <b r />
</d i v> <b r />
@endif <d i v>
@ i f ( count ( $ e r r o r s ) > 0 ) <p> 2 0 1 5 A l l
<d i v c l a s s=” a l e r t a l e r t −d a n g e r ” Rights
r o l e=” a l e r t ”> Reserved .
@ f o r e a c h ( $ e r r o r s −> a l l ( ) a s $ e r r o r
) Gentelella
<span c l a s s=” g l y p h i c o n Alela !
g l y p h i c o n −e x c l a m a t i o n − is a
s i g n ” a r i a −h i d d e n=” t r u e Bootstrap
”></span> 3
{{ $ e r r o r }} template
@endforeach . </p>
</d i v> </d i v>
@endif <d i v>
<img s r c=” {{
<d i v i d=” wrapper ”> URL : :
<d i v i d=” l o g i n ” c l a s s=” a n i m a t e asset ( ’
form ”> images /
< s e c t i o n c l a s s=” l o g i n c o n t e n t ” UPManila .
> png ’ ) }} ”
{ ! ! Form : : open ( array ( ’ a l t=”UP
method ’ => ’POST ’ , ’ Manila ”
r o u t e ’ => ’ auth . l o g i n w i d t h=” 35
’)) !!} px ”>
{ ! ! Form : : h i d d e n ( ’ t o k e n ’ , In p a r t i a l
csrf token () ) !!} fulfillment
<c e n t e r ><img s r c=” {{ of the
URL : : a s s e t ( ’ requirements
images / for the
LAGlobalEDCC . png degree of
’ ) }} ” a l t=”LA BS
G l o b a l EDCC” Computer
w i d t h=” 360 px ”></ Science
center> i n UP
<h2>− GeoTest −</h2> Manila .
<d i v> </d i v>
{ ! ! Form : : t e x t ( ’ </d i v>
email ’ , old ( ’ { ! ! Form : : c l o s e ( ) ! ! }
email ’ ) , [ ’ <!−− form −−>
c l a s s ’ => ’ </ s e c t i o n >
form−c o n t r o l ’ <!−− c o n t e n t −−>
, ’ </d i v>
placeholder ’ </d i v>
=> ’ Email </d i v>
Address ’ , ’
r e q u i r e d ’ => </body>
’ true ’ ] ) ! ! } </html>
</d i v>
<d i v>
{ ! ! Form : : p a s s w o r d
( ’ password ’ ,
[ ’ c l a s s ’ => ’
Listing 66: auth/register.blade.php
form−c o n t r o l ’ <!DOCTYPE html>
, ’ <html l a n g=” en ”>
placeholder ’
=> ’ Password ’ <head>
, ’ required ’ <meta h t t p−e q u i v=” Content−Type ” c o n t e n t=”
=> ’ t r u e ’ ] ) t e x t / html ; c h a r s e t=UTF−8”>
!!} <!−− Meta , t i t l e , CSS , f a v i c o n s , e t c . −−>
</d i v> <meta c h a r s e t=” u t f −8”>
<d i v> <meta h t t p−e q u i v=”X−UA−C o m p a t i b l e ” c o n t e n t
{ ! ! Form : : s u b m i t ( ’ =” IE=e d g e ”>
Login ’ , [ ’ <meta name=” v i e w p o r t ” c o n t e n t=” w i d t h=
c l a s s ’ => ’ d e v i c e −width , i n i t i a l −s c a l e =1”>
btn btn−
primary ’ ] , [ ’ < t i t l e >R e g i s t e r </ t i t l e >
s t y l e ’ => ’
margin−r i g h t : <!−− B o o t s t r a p c o r e CSS −−>
15 px ; ’ ] ) ! ! }
<b r /> <l i n k h r e f=” . . / c s s / b o o t s t r a p . min . c s s ” r e l =
</d i v> ” s t y l e s h e e t ”>
<d i v c l a s s=” c l e a r f i x ”
></d i v> <l i n k h r e f=” . . / f o n t s / c s s / f o n t −awesome . min .
<d i v c l a s s=” s e p a r a t o r ” c s s ” r e l =” s t y l e s h e e t ”>
> <l i n k h r e f=” . . / c s s / a n i m a t e . min . c s s ” r e l =”
<p c l a s s=” s t y l e s h e e t ”>
c h a n g e l i n k ”>
New t o <!−− Custom s t y l i n g p l u s p l u g i n s −−>
company ? <l i n k h r e f=” . . / c s s / custom . c s s ” r e l =”
{!! s t y l e s h e e t ”>
link to route <l i n k h r e f=” . . / c s s / i c h e c k / f l a t / g r e e n . c s s ”
( ’ auth . r e l =” s t y l e s h e e t ”>
register ’
, ’ Create <!−− e d i t o r −−>
an <l i n k h r e f=” h t t p : / / n e t d n a . b o o t s t r a p c d n . com
account ’ , / f o n t −awesome / 3 . 0 . 2 / c s s / f o n t −awesome .
null , c s s ” r e l =” s t y l e s h e e t ”>
array ( ’ <l i n k h r e f=” . . / c s s / e d i t o r / e x t e r n a l / g o o g l e −
c l a s s ’ => code−p r e t t i f y / p r e t t i f y . c s s ” r e l =”
’ s t y l e s h e e t ”>
104
<l i n k h r e f=” . . / c s s / e d i t o r / i n d e x . c s s ” r e l =” Email ∗ ’ ) ! ! }
s t y l e s h e e t ”> { ! ! Form : : t e x t ( ’
<!−− s e l e c t 2 −−> email ’ , old ( ’
<l i n k h r e f=” . . / c s s / s e l e c t / s e l e c t 2 . min . c s s ” email ’ ) , [ ’
r e l =” s t y l e s h e e t ”> c l a s s ’ => ’
<!−− s w i t c h e r y −−> form−c o n t r o l ’
<l i n k h r e f=” . . / c s s / s w i t c h e r y / s w i t c h e r y . min , ’ required ’
. c s s ” r e l =” s t y l e s h e e t ”/> => ’ t r u e ’ ] )
!!}
<s c r i p t s r c=” . . / j s / j q u e r y . min . j s ”></ s c r i p t </d i v>
>
</head> <d i v c l a s s=” form−g r o u p
”>
<body s t y l e=” b a c k g r o u n d :#F7F7F7 ; ”> { ! ! Form : : l a b e l ( ’
contact ’ , ’
<d i v c l a s s=” ”> Contact
Number ∗ ’ )
@ i f ( count ( $ e r r o r s ) > 0 ) !!}
<d i v c l a s s=” a l e r t a l e r t −d a n g e r ” { ! ! Form : : t e x t ( ’
r o l e=” a l e r t ”> contact ’ , old
@ f o r e a c h ( $ e r r o r s −> a l l ( ) a s $ e r r o r ( ’ contact ’ ) ,
) [ ’ c l a s s ’ => ’
<span c l a s s=” g l y p h i c o n form−c o n t r o l ’
g l y p h i c o n −e x c l a m a t i o n − , ’
s i g n ” a r i a −h i d d e n=” t r u e ” placeholder ’
></span> => ’ +63 9
{{ $ e r r o r }} xxxxxxxxx ’ , ’
<b r /> r e q u i r e d ’ =>
@endforeach ’ true ’ ] ) ! ! }
</d i v> </d i v>
@endif
<d i v c l a s s=” form−g r o u p
<d i v i d=” wrapper ”> ”>
<d i v c l a s s=” a n i m a t e form ”> { ! ! Form : : l a b e l ( ’
< s e c t i o n c l a s s=” l o g i n c o n t e n t ” password ’ , ’
> Password ∗ ’ )
{ ! ! Form : : open ( array ( ’ !!}
method ’ => ’POST ’ , ’ { ! ! Form : : p a s s w o r d
r o u t e ’ => ’ auth . ( ’ password ’ ,
register ’)) !!} [ ’ c l a s s ’ => ’
{ ! ! Form : : h i d d e n ( ’ t o k e n ’ , form−c o n t r o l ’
csrf token () ) !!} , ’ required ’
<h1>C r e a t e Account </h1 => ’ t r u e ’ ] )
> !!}
</d i v>
</ s e c t i o n >
<d i v c l a s s=” form−g r o u p
<d i v c l a s s=” form−g r o u p ”>
”> { ! ! Form : : l a b e l ( ’
{ ! ! Form : : l a b e l ( ’ password confirmation
firstname ’ , ’ ’ , ’ Confirm
F i r s t Name ∗ ’ Password ∗ ’ )
) !!} !!}
{ ! ! Form : : t e x t ( ’ { ! ! Form : : p a s s w o r d
firstname ’ , (’
old ( ’ password confirmation
firstname ’ ) , ’ , [ ’ class ’
[ ’ c l a s s ’ => ’ => ’ form−
form−c o n t r o l ’ control ’ , ’
, ’ required ’ r e q u i r e d ’ =>
=> ’ t r u e ’ ] ) ’ true ’ ] ) ! ! }
!!} </d i v>
</d i v>
< s e c t i o n c l a s s=”
<d i v c l a s s=” form−g r o u p l o g i n c o n t e n t ”>
”>
{ ! ! Form : : l a b e l ( ’ <d i v>
middlename ’ , { ! ! Form : : s u b m i t ( ’
’ M i d d l e Name ’ Submit ’ , [ ’
) !!} c l a s s ’ => ’
{ ! ! Form : : t e x t ( ’ btn btn−
middlename ’ , primary ’ ] , [ ’
old ( ’ s t y l e ’ => ’
middlename ’ ) , margin−r i g h t :
[ ’ c l a s s ’ => 15 px ; ’ ] ) ! ! }
’ form−c o n t r o l <b r />
’ ]) !!} </d i v>
</d i v> <d i v c l a s s=” c l e a r f i x ”
></d i v>
<d i v c l a s s=” form−g r o u p <d i v c l a s s=” s e p a r a t o r ”
”> >
{ ! ! Form : : l a b e l ( ’ <p c l a s s=”
lastname ’ , ’ c h a n g e l i n k ”>
L a s t Name ∗ ’ ) Already a
!!} member?
{ ! ! Form : : t e x t ( ’ {!!
lastname ’ , link to route
old ( ’ lastname ( ’ auth .
’) , [ ’ class ’ login ’ , ’
=> ’ form− Log i n ’ ,
control ’ , ’ null ,
r e q u i r e d ’ => array ( ’
’ true ’ ] ) ! ! } c l a s s ’ =>
</d i v> ’
to login ’
<d i v c l a s s=” form−g r o u p )) !!}
”> </p>
{ ! ! Form : : l a b e l ( ’ <d i v c l a s s=”
email ’ , ’ c l e a r f i x ”></
105
d i v> −12 ’ , ’
<b r /> r e q u i r e d ’ =>
<b r /> ’ true ’ ] ) ! ! }
<d i v> </d i v>
<p> 2 0 1 5 A l l </d i v>
Rights <d i v c l a s s=” form−g r o u p ”>
Reserved . { ! ! Form : : l a b e l ( ’
bh weather ’ , ’
Gentelella Weather ’ , array ( ’
Alela ! c l a s s ’ => ’
is a c o n t r o l −l a b e l c o l
Bootstrap −md−3 c o l −sm−3
3 c o l −xs −12 ’ ) ) ! ! }
template <d i v c l a s s=” c o l −md−6
. </p> c o l −sm−6 c o l −xs
</d i v> −12”>
</d i v> { ! ! Form : : t e x t ( ’
{ ! ! Form : : c l o s e ( ) !!} bh weather ’ ,
</ s e c t i o n > old ( ’
</d i v> bh weather ’ ) ,
</d i v> [ ’ c l a s s ’ =>
</d i v> ’ form−c o n t r o l
c o l −md−7 c o l
</body> −xs −12 ’ ] ) ! ! }
</html> </d i v>
</d i v>
<d i v c l a s s=” form−g r o u p ”>
{ ! ! Form : : l a b e l ( ’
Listing 67: boreholes/create.blade.php bh operator ’ , ’
Operator ∗ ’ ,
@extends ( ’ l a y o u t s / m a s t e r ’ ) array ( ’ c l a s s ’ =>
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) ’ c o n t r o l −l a b e l
@section ( ’ content ’ ) c o l −md−3 c o l −sm−3
<d i v c l a s s=” row ”> c o l −xs −12 ’ ) ) ! ! }
<d i v c l a s s=” c o l −md−12 c o l −sm−12 c o l −xs −12” <d i v c l a s s=” c o l −md−6
> c o l −sm−6 c o l −xs
<d i v c l a s s=” x p a n e l ”> −12”>
<d i v c l a s s=” x t i t l e ”> { ! ! Form : : t e x t ( ’
<h2> Add B o r e h o l e </h2> bh operator ’ ,
<u l c l a s s=” nav navbar−r i g h t old ( ’
p a n e l t o o l b o x ”> bh operator ’ )
< l i ><a c l a s s=” c o l l a p s e − , [ ’ c l a s s ’ =>
l i n k ”><i c l a s s=” f a f a ’ form−
−c h e v r o n−up”></i ></a> control col−
</ l i > md−7 c o l −xs
< l i c l a s s=” dropdown ”> −12 ’ , ’
<a h r e f=”#” c l a s s=” r e q u i r e d ’ =>
dropdown−t o g g l e ” ’ true ’ ] ) ! ! }
data−t o g g l e=” </d i v>
dropdown ” r o l e=” </d i v>
button ” aria − <d i v c l a s s=” form−g r o u p ”>
expanded=” f a l s e ” { ! ! Form : : l a b e l ( ’
><i c l a s s=” f a f a − bh inspector ’ , ’
wrench ”></i ></a> I n s p e c t o r ’ , array
<u l c l a s s=” dropdown− ( ’ c l a s s ’ => ’
menu” r o l e=”menu” c o n t r o l −l a b e l c o l
> −md−3 c o l −sm−3
< l i ><a h r e f=”#”> c o l −xs −12 ’ ) ) ! ! }
S e t t i n g s 1</a <d i v c l a s s=” c o l −md−6
> c o l −sm−6 c o l −xs
</ l i > −12”>
< l i ><a h r e f=”#”> { ! ! Form : : t e x t ( ’
S e t t i n g s 2</a bh inspector ’
> , old ( ’
</ l i > bh inspector ’
</u l > ) , [ ’ class ’
</ l i > => ’ form−
</u l > control col−
<d i v c l a s s=” c l e a r f i x ”></d i v> md−7 c o l −xs
</d i v> −12 ’ ] ) ! ! }
<d i v c l a s s=” x c o n t e n t ”> </d i v>
</d i v>
{ ! ! Form : : open ( [ ’ name ’ => ’ <d i v c l a s s=” form−g r o u p ”>
s t o r e f o r m ’ , ’ method ’ => { ! ! Form : : l a b e l ( ’
’POST ’ , ’ r o u t e ’ => ’ bh drill rig ’ , ’
boreholes . store ’ , ’ class ’ D r i l l Rig ’ , array
=> ’ form−h o r i z o n t a l form ( ’ c l a s s ’ => ’
−l a b e l − l e f t ’ ] ) ! ! } c o n t r o l −l a b e l c o l
<d i v c l a s s=” c o n t a i n e r ”> −md−3 c o l −sm−3
<d i v c l a s s=” form−g r o u p ”> c o l −xs −12 ’ ) ) ! ! }
{ ! ! Form : : l a b e l ( ’ <d i v c l a s s=” c o l −md−6
bh max depth ’ , ’ c o l −sm−6 c o l −xs
Maximum Depth (m) −12”>
∗ ’ , array ( ’ c l a s s { ! ! Form : : t e x t ( ’
’ => ’ c o n t r o l − bh drill rig ’
l a b e l c o l −md−3 , old ( ’
c o l −sm−3 c o l −xs bh drill rig ’
−12 ’ ) ) ! ! } ) , [ ’ class ’
<d i v c l a s s=” c o l −md−6 => ’ form−
c o l −sm−6 c o l −xs control col−
−12”> md−7 c o l −xs
{ ! ! Form : : number ( ’ −12 ’ , ’
bh max depth ’ placeholder ’
, old ( ’ => ’YBM’ ] )
bh max depth ’ !!}
) , [ ’ class ’ </d i v>
=> ’ form− </d i v>
control col− <d i v c l a s s=” form−g r o u p ”>
md−7 c o l −xs { ! ! Form : : l a b e l ( ’
106
bh drill pump ’ , ’ </d i v>
D r i l l Pump ’ , <d i v c l a s s=” form−g r o u p ”>
array ( ’ c l a s s ’ => { ! ! Form : : l a b e l ( ’
’ c o n t r o l −l a b e l b h r o d ’ , ’ Rod ∗ ’ ,
c o l −md−3 c o l −sm−3 array ( ’ c l a s s ’ =>
c o l −xs −12 ’ ) ) ! ! } ’ c o n t r o l −l a b e l
<d i v c l a s s=” c o l −md−6 c o l −md−3 c o l −sm−3
c o l −sm−6 c o l −xs c o l −xs −12 ’ ) ) ! ! }
−12”> <d i v c l a s s=” c o l −md−6
{ ! ! Form : : t e x t ( ’ c o l −sm−6 c o l −xs
bh drill pump −12”>
’ , old ( ’ { ! ! Form : : t e x t ( ’
bh drill pump bh rod ’ , old (
’) , [ ’ class ’ ’ bh rod ’ ) , [ ’
=> ’ form− c l a s s ’ => ’
control col− form−c o n t r o l
md−7 c o l −xs c o l −md−7 c o l −
−12 ’ , ’ xs −12 ’ , ’
placeholder ’ r e q u i r e d ’ =>
=> ’ Shark ’ ] ) ’ true ’ ] ) ! ! }
!!} </d i v>
</d i v> </d i v>
</d i v> <d i v c l a s s=” form−g r o u p ”>
<d i v c l a s s=” form−g r o u p ”> { ! ! Form : : l a b e l ( ’
{ ! ! Form : : l a b e l ( ’ bh sampler ’ , ’
bh hammer weight ’ Sampler ∗ ’ , array
, ’ Hammer Weight ( ’ c l a s s ’ => ’
( kg ) ’ , array ( ’ c o n t r o l −l a b e l c o l
c l a s s ’ => ’ −md−3 c o l −sm−3
c o n t r o l −l a b e l c o l c o l −xs −12 ’ ) ) ! ! }
−md−3 c o l −sm−3 <d i v c l a s s=” c o l −md−6
c o l −xs −12 ’ ) ) ! ! } c o l −sm−6 c o l −xs
<d i v c l a s s=” c o l −md−6 −12”>
c o l −sm−6 c o l −xs { ! ! Form : : t e x t ( ’
−12”> bh sampler ’ ,
{ ! ! Form : : number ( ’ old ( ’
bh hammer weight bh sampler ’ ) ,
’ , old ( ’ [ ’ c l a s s ’ =>
bh hammer weight ’ form−c o n t r o l
’) , [ ’ class ’ c o l −md−7 c o l
=> ’ form− −xs −12 ’ , ’
control col− r e q u i r e d ’ =>
md−7 c o l −xs ’ true ’ ] )
−12 ’ , ’ s t e p ’ !!}
=> ’ any ’ , ’ </d i v>
placeholder ’ </d i v>
=> ’ 6 3 . 5 ’ ] ) <d i v c l a s s=” form−g r o u p ”>
!!} { ! ! Form : : l a b e l ( ’
</d i v> bh water elevation
</d i v> ’ , ’ Water
<d i v c l a s s=” form−g r o u p ”> E l e v a t i o n (m) ∗ ’ ,
{ ! ! Form : : l a b e l ( ’ array ( ’ c l a s s ’ =>
bh height of drop ’ c o n t r o l −l a b e l
’ , ’ Height o f c o l −md−3 c o l −sm−3
Drop (m) ’ , array ( col xs −12 ’ ) )
’ c l a s s ’ => ’ !!}
c o n t r o l −l a b e l c o l <d i v c l a s s=” c o l −md−6
−md−3 c o l −sm−3 c o l −sm−6 c o l −xs
c o l −xs −12 ’ ) ) ! ! } −12”>
<d i v c l a s s=” c o l −md−6 { ! ! Form : : number ( ’
c o l −sm−6 c o l −xs bh water elevation
−12”> ’ , old ( ’
{ ! ! Form : : number ( ’ bh water elevation
bh height of drop ’) , [ ’ class ’
’ , old ( ’ => ’ form−
bh height of drop control col−
’) , [ ’ class ’ md−7 c o l −xs
=> ’ form− −12 ’ , ’
control col− r e q u i r e d ’ =>
md−7 c o l −xs ’ true ’ , ’ step
−12 ’ , ’ step ’ ’ => ’ any ’ ] )
=> ’ any ’ , ’ !!}
placeholder ’ </d i v>
=> ’ 1 . 6 ’ ] ) </d i v>
!!} <d i v c l a s s=” form−g r o u p ”>
</d i v> { ! ! Form : : l a b e l ( ’
</d i v> bh surface elevation
<d i v c l a s s=” form−g r o u p ”> ’ , ’ Surface
{ ! ! Form : : l a b e l ( ’ Elevation ∗ ’ ,
bh casing ’ , ’ array ( ’ c l a s s ’ =>
C a s i n g ∗ ’ , array ( ’ c o n t r o l −l a b e l
’ c l a s s ’ => ’ c o l −md−3 c o l −sm−3
c o n t r o l −l a b e l c o l c o l −xs −12 ’ ) ) ! ! }
−md−3 c o l −sm−3 <d i v c l a s s=” c o l −md−6
c o l −xs −12 ’ ) ) ! ! } c o l −sm−6 c o l −xs
<d i v c l a s s=” c o l −md−6 −12”>
c o l −sm−6 c o l −xs { ! ! Form : : number ( ’
−12”> bh surface elevation
{ ! ! Form : : t e x t ( ’ ’ , old ( ’
bh casing ’ , bh surface elevation
old ( ’ ’) , [ ’ class ’
bh casing ’ ) , => ’ form−
[ ’ c l a s s ’ => ’ control col−
form−c o n t r o l md−7 c o l −xs
c o l −md−7 c o l − −12 ’ , ’
xs −12 ’ , ’ r e q u i r e d ’ =>
r e q u i r e d ’ => ’ true ’ , ’ step
’ true ’ ] ) ! ! } ’ => ’ any ’ ] )
</d i v> !!}
107
</d i v> </ l i >
</d i v> < l i ><a h r e f=”#”>
<d i v c l a s s=” form−g r o u p ”> S e t t i n g s 2</a
{ ! ! Form : : l a b e l ( ’ >
bh start date ’ , ’ </ l i >
S t a r t Date − End </u l >
Date ∗ ’ , [ ’ c l a s s ’ </ l i >
=> ’ c o n t r o l − </u l >
l a b e l c o l −md−3 <d i v c l a s s=” c l e a r f i x ”></d i v>
c o l −sm−3 c o l −xs </d i v>
−12 ’ ] ) ! ! } <d i v c l a s s=” x c o n t e n t ”>
<d i v c l a s s=” c o l −md−3 { ! ! Form : : open ( [ ’ name ’ => ’
c o l −sm−6 c o l −xs u p d a t e f o r m ’ , ’ method ’ =>
−12 form−g r o u p ”> ’PUT ’ , ’ r o u t e ’ => [ ’
{ ! ! Form : : date ( ’ b o r e h o l e s . update ’ ,
bh start date $ b o r e h o l e −>i d ] , ’ c l a s s ’
’ , old ( ’ => ’ form horizontal
bh start date form−l a b e l − l e f t ’ , ’ i d ’ =>
’) , [ ’ class ’ ’ update form ’ ] ) ! ! }
=> ’ form− <d i v c l a s s=” c o n t a i n e r ”>
control ’ , ’ <d i v c l a s s=” form−g r o u p ”>
r e q u i r e d ’ => { ! ! Form : : l a b e l ( ’
’ true ’ ] ) ! ! } bh max depth ’ , ’
</d i v> Maximum Depth (m)
<d i v c l a s s=” c o l −md−3 ∗ ’ , array ( ’ c l a s s
c o l −sm−6 c o l −xs ’ => ’ c o n t r o l −
−12 form−g r o u p ”> l a b e l c o l −md−3
{ ! ! Form : : date ( ’ c o l −sm−3 c o l −xs
bh end date ’ , −12 ’ ) ) ! ! }
old ( ’ <d i v c l a s s=” c o l −md−6
bh start date c o l −sm−6 c o l −xs
’) , [ ’ class ’ −12”>
=> ’ form− <?php
control ’ , ’ $bh max depth
r e q u i r e d ’ => = Helper : :
’ true ’ ] ) ! ! } getValue ( old (
</d i v> ’ bh max depth
</d i v> ’ ) , $borehole
</d i v> −>
<d i v c l a s s=” l n s o l i d ”></d i v> bh max depth )
<?php $bh num = $ p r o j e c t −> ?>
proj num of boreholes + 1 { ! ! Form : : number ( ’
?> bh max depth ’
{ ! ! Form : : h i d d e n ( ’ bh num ’ , ,
$bh num ) ! ! } $bh max depth
{ ! ! Form : : h i d d e n ( ’ p r o j i d ’ , , [ ’ c l a s s ’ =>
$ p r o j e c t −>i d ) ! ! } ’ form−
{ ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ control col−
Back ’ , array ( ’ c l a s s ’ => ’ md−7 c o l −xs
btn btn−d e f a u l t ’ ) ) ! ! } −12 ’ , ’
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’ r e q u i r e d ’ =>
c l a s s ’ => ’ btn btn− ’ true ’ ] ) ! ! }
p r i m a r y ’ , ’ s t y l e ’ => ’ </d i v>
float : right ’ ]) !!} </d i v>
{ ! ! Form : : c l o s e ( ) ! ! } <d i v c l a s s=” form−g r o u p ”>
</d i v> { ! ! Form : : l a b e l ( ’
</d i v> bh weather ’ , ’
</d i v> Weather ’ , array ( ’
</d i v> c l a s s ’ => ’
@endsection c o n t r o l −l a b e l c o l
−md−3 c o l −sm−3
c o l −xs −12 ’ ) ) ! ! }
<d i v c l a s s=” c o l −md−6
Listing 68: boreholes/edit.blade.php c o l −sm−6 c o l −xs
−12”>
@extends ( ’ l a y o u t s / m a s t e r ’ ) <?php $ b h w e a t h e r
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) = Helper : :
@section ( ’ content ’ ) getValue ( old (
’ bh weather ’ )
<d i v c l a s s=” row ”> , $ b o r e h o l e −>
<d i v c l a s s=” c o l −md−12 c o l −sm−12 c o l −xs −12” bh weather )
> ?>
<d i v c l a s s=” x p a n e l ”> { ! ! Form : : t e x t ( ’
<d i v c l a s s=” x t i t l e ”> bh weather ’ ,
<h2> E d i t B o r e h o l e {{ $bh weather ,
$ b o r e h o l e −>bh num }} < [ ’ c l a s s ’ => ’
s m a l l >(ID#{{ $ b o r e h o l e −> form−c o n t r o l
i d } } )</ s m a l l ></h2> c o l −md−7 c o l −
<u l c l a s s=” nav navbar−r i g h t xs −12 ’ ] ) ! ! }
p a n e l t o o l b o x ”> </d i v>
< l i ><a c l a s s=” c o l l a p s e − </d i v>
l i n k ”><i c l a s s=” f a f a <d i v c l a s s=” form−g r o u p ”>
−c h e v r o n−up”></i ></a> { ! ! Form : : l a b e l ( ’
</ l i > bh operator ’ , ’
< l i c l a s s=” dropdown ”> Operator ∗ ’ ,
<a h r e f=”#” c l a s s=” array ( ’ c l a s s ’ =>
dropdown−t o g g l e ” ’ c o n t r o l −l a b e l
data−t o g g l e=” c o l −md−3 c o l −sm−3
dropdown ” r o l e=” c o l −xs −12 ’ ) ) ! ! }
button ” aria − <d i v c l a s s=” c o l −md−6
expanded=” f a l s e ” c o l −sm−6 c o l −xs
><i c l a s s=” f a f a − −12”>
wrench ”></i ></a> <?php $ b h o p e r a t o r
<u l c l a s s=” dropdown− = Helper : :
menu” r o l e=”menu” getValue ( old (
> ’ bh operator ’
< l i ><a h r e f=”#”> ) , $borehole
S e t t i n g s 1</a −>b h o p e r a t o r
> ) ?>
108
{ ! ! Form : : t e x t ( ’ ’,
bh operator ’ , $bh drill pump
$bh operator , [ ’ c l a s s ’ =>
, [ ’ c l a s s ’ => ’ form−
’ form− control col−
control col− md−7 c o l −xs
md−7 c o l −xs −12 ’ , ’
−12 ’ , ’ r e q u i r e d ’ =>
r e q u i r e d ’ => ’ true ’ ] ) ! ! }
’ true ’ ] ) ! ! } </d i v>
</d i v> </d i v>
</d i v> <d i v c l a s s=” form−g r o u p ”>
<d i v c l a s s=” form−g r o u p ”> { ! ! Form : : l a b e l ( ’
{ ! ! Form : : l a b e l ( ’ bh hammer weight ’
bh inspector ’ , ’ , ’ Hammer Weight
I n s p e c t o r ’ , array ( kg ) ∗ ’ , array ( ’
( ’ c l a s s ’ => ’ c l a s s ’ => ’
c o n t r o l −l a b e l c o l c o n t r o l −l a b e l c o l
−md−3 c o l −sm−3 −md−3 c o l −sm−3
c o l −xs −12 ’ ) ) ! ! } c o l −xs −12 ’ ) ) ! ! }
<d i v c l a s s=” c o l −md−6 <d i v c l a s s=” c o l −md−6
c o l −sm−6 c o l −xs c o l −sm−6 c o l −xs
−12”> −12”>
<?php <?php
$bh inspector $bh hammer weight
= Helper : : = Helper : :
getValue ( old ( getValue ( old (
’ bh inspector ’
’ ) , $borehole bh hammer weight
−> ’ ) , $borehole
bh inspector ) −>
?> bh hammer weight
{ ! ! Form : : t e x t ( ’ ) ?>
bh inspector ’ { ! ! Form : : number ( ’
, bh hammer weight
$bh inspector ’,
, [ ’ c l a s s ’ => $bh hammer weight
’ form− , [ ’ c l a s s ’ =>
control col− ’ form−
md−7 c o l −xs control col−
−12 ’ ] ) ! ! } md−7 c o l −xs
</d i v> −12 ’ , ’
</d i v> r e q u i r e d ’ =>
<d i v c l a s s=” form−g r o u p ”> ’ true ’ , ’ step
{ ! ! Form : : l a b e l ( ’ ’ => ’ any ’ ] )
bh drill rig ’ , ’ !!}
D r i l l Rig ∗ ’ , </d i v>
array ( ’ c l a s s ’ => </d i v>
’ c o n t r o l −l a b e l <d i v c l a s s=” form−g r o u p ”>
c o l −md−3 c o l −sm−3 { ! ! Form : : l a b e l ( ’
c o l −xs −12 ’ ) ) ! ! } bh height of drop
<d i v c l a s s=” c o l −md−6 ’ , ’ Height o f
c o l −sm−6 c o l −xs Drop (m) ∗ ’ ,
−12”> array ( ’ c l a s s ’ =>
<?php ’ c o n t r o l −l a b e l
$bh drill rig c o l −md−3 c o l −sm−3
= Helper : : c o l −xs −12 ’ ) ) ! ! }
getValue ( old ( <d i v c l a s s=” c o l −md−6
’ bh drill rig c o l −sm−6 c o l −xs
’ ) , $borehole −12”>
−> <?php
bh drill rig ) $bh height of drop
?> = Helper : :
{ ! ! Form : : t e x t ( ’ getValue ( old (
bh drill rig ’ ’
, bh height of drop
$bh drill rig ’ ) , $borehole
, [ ’ c l a s s ’ => −>
’ form− bh height of drop
control col− ) ?>
md−7 c o l −xs { ! ! Form : : number ( ’
−12 ’ , ’ bh height of drop
r e q u i r e d ’ => ’,
’ true ’ ] ) ! ! } $bh height of drop
</d i v> , [ ’ c l a s s ’ =>
</d i v> ’ form−
<d i v c l a s s=” form−g r o u p ”> control col−
{ ! ! Form : : l a b e l ( ’ md−7 c o l −xs
bh drill pump ’ , ’ −12 ’ , ’
D r i l l Pump ∗ ’ , r e q u i r e d ’ =>
array ( ’ c l a s s ’ => ’ true ’ , ’ step
’ c o n t r o l −l a b e l ’ => ’ any ’ ] )
c o l −md−3 c o l −sm−3 !!}
c o l −xs −12 ’ ) ) ! ! } </d i v>
<d i v c l a s s=” c o l −md−6 </d i v>
c o l −sm−6 c o l −xs <d i v c l a s s=” form−g r o u p ”>
−12”> { ! ! Form : : l a b e l ( ’
<?php bh casing ’ , ’
$bh drill pump C a s i n g ∗ ’ , array (
= Helper : : ’ c l a s s ’ => ’
getValue ( old ( c o n t r o l −l a b e l c o l
’ −md−3 c o l −sm−3
bh drill pump c o l −xs −12 ’ ) ) ! ! }
’ ) , $borehole <d i v c l a s s=” c o l −md−6
−> c o l −sm−6 c o l −xs
bh drill pump −12”>
) ?> <?php $ b h c a s i n g =
{ ! ! Form : : t e x t ( ’ Helper : :
bh drill pump getValue ( old (
109
’ bh casing ’ ) , md−7 c o l −xs
$ b o r e h o l e −> −12 ’ , ’
b h c a s i n g ) ?> r e q u i r e d ’ =>
{ ! ! Form : : t e x t ( ’ ’ true ’ , ’ step
bh casing ’ , ’ => ’ any ’ ] )
$bh casing , [ !!}
’ c l a s s ’ => ’ </d i v>
form−c o n t r o l </d i v>
c o l −md−7 c o l − <d i v c l a s s=” form−g r o u p ”>
xs −12 ’ , ’ { ! ! Form : : l a b e l ( ’
r e q u i r e d ’ => bh surface elevation
’ true ’ ] ) ! ! } ’ , ’ Surface
</d i v> Elevation ∗ ’ ,
</d i v> array ( ’ c l a s s ’ =>
<d i v c l a s s=” form−g r o u p ”> ’ c o n t r o l −l a b e l
{ ! ! Form : : l a b e l ( ’ c o l −md−3 c o l −sm−3
b h r o d ’ , ’ Rod ∗ ’ , c o l −xs −12 ’ ) ) ! ! }
array ( ’ c l a s s ’ => <d i v c l a s s=” c o l −md−6
’ c o n t r o l −l a b e l c o l −sm−6 c o l −xs
c o l −md−3 c o l −sm−3 −12”>
c o l −xs −12 ’ ) ) ! ! } <?php
<d i v c l a s s=” c o l −md−6 $bh surface elevation
c o l −sm−6 c o l −xs = Helper : :
−12”> getValue ( old (
<?php $ b h r o d = ’
Helper : : bh surface elevation
getValue ( old ( ’ ) , $borehole
’ bh rod ’ ) , −>
$ b o r e h o l e −> bh surface elevation
b h r o d ) ?> ) ?>
{ ! ! Form : : t e x t ( ’ { ! ! Form : : number ( ’
bh rod ’ , bh surface elevation
$bh rod , [ ’ ’,
c l a s s ’ => ’ $bh surface elevation
form−c o n t r o l , [ ’ c l a s s ’ =>
c o l −md−7 c o l − ’ form−
xs −12 ’ , ’ control col−
r e q u i r e d ’ => md−7 c o l −xs
’ true ’ ] ) ! ! } −12 ’ , ’
</d i v> r e q u i r e d ’ =>
</d i v> ’ true ’ , ’ step
<d i v c l a s s=” form−g r o u p ”> ’ => ’ any ’ ] )
{ ! ! Form : : l a b e l ( ’ !!}
bh sampler ’ , ’ </d i v>
Sampler ∗ ’ , array </d i v>
( ’ c l a s s ’ => ’ <d i v c l a s s=” form−g r o u p ”>
c o n t r o l −l a b e l c o l { ! ! Form : : l a b e l ( ’
−md−3 c o l −sm−3 bh start date ’ , ’
c o l −xs −12 ’ ) ) ! ! } S t a r t Date − End
<d i v c l a s s=” c o l −md−6 Date ∗ ’ , [ ’ c l a s s ’
c o l −sm−6 c o l −xs => ’ c o n t r o l −
−12”> l a b e l c o l −md−3
<?php $ b h s a m p l e r c o l −sm−3 c o l −xs
= Helper : : −12 ’ ] ) ! ! }
getValue ( old ( <d i v c l a s s=” c o l −md−3
’ bh sampler ’ ) c o l −sm−6 c o l −xs
, $ b o r e h o l e −> −12 form−g r o u p ”>
bh sampler ) <?php
?> $bh start date
{ ! ! Form : : t e x t ( ’ = Helper : :
bh sampler ’ , getValue ( old (
$bh sampler , ’
[ ’ c l a s s ’ => ’ bh start date
form−c o n t r o l ’ ) , $borehole
c o l −md−7 c o l − −>
xs −12 ’ , ’ bh start date
r e q u i r e d ’ => ) ?>
’ true ’ ] ) ! ! } { ! ! Form : : date ( ’
</d i v> bh start date
</d i v> ’,
<d i v c l a s s=” form−g r o u p ”> $bh start date
{ ! ! Form : : l a b e l ( ’ , [ ’ c l a s s ’ =>
bh water elevation ’ form−
’ , ’ Water control ’ , ’
E l e v a t i o n (m) ∗ ’ , r e q u i r e d ’ =>
array ( ’ c l a s s ’ => ’ true ’ , ’
’ c o n t r o l −l a b e l placeholder ’
c o l −md−3 c o l −sm−3 => ’ S t a r t
c o l −xs −12 ’ ) ) ! ! } Date ’ ] ) ! ! }
<d i v c l a s s=” c o l −md−6 </d i v>
c o l −sm−6 c o l −xs <d i v c l a s s=” c o l −md−3
−12”> c o l −sm−6 c o l −xs
<?php −12 form−g r o u p ”>
$bh water elevation <?php $ b h e n d d a t e
= Helper : : = Helper : :
getValue ( old ( getValue ( old (
’ ’ bh end date ’
bh water elevation ) , $borehole
’ ) , $borehole −>b h e n d d a t e
−> ) ?>
bh water elevation { ! ! Form : : date ( ’
) ?> bh end date ’ ,
{ ! ! Form : : number ( ’ $bh end date
bh water elevation , [ ’ c l a s s ’ =>
’, ’ form−
$bh water elevation control ’ , ’
, [ ’ c l a s s ’ => r e q u i r e d ’ =>
’ form− ’ true ’ , ’
control col− placeholder ’
110
=> ’ End Date ’ $myDateTime−>
]) !!} format ( ’F d ,
</d i v> Y’ ) ;
</d i v> ?>
</d i v> <t h s c o p e=” row ”>
<d i v c l a s s=” l n s o l i d ”></d i v> S t a r t Date −
{ ! ! Form : : h i d d e n ( ’ bh num ’ , End Date</th>
$ b o r e h o l e −>bh num ) ! ! } <td >{{ $ s t a r t d a t e
{ ! ! Form : : h i d d e n ( ’ p r o j i d ’ , }} − {{
$ p r o j e c t −>i d ) ! ! } $end date
{ ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ }}</td>
Back ’ , array ( ’ c l a s s ’ => ’ </t r >
btn btn−d e f a u l t ’ ) ) ! ! } <t r >
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’ <t h s c o p e=” row ”>
c l a s s ’ => ’ btn btn− Weather</th>
p r i m a r y ’ , ’ s t y l e ’ => ’ <td >{{ $ b o r e h o l e −>
float : right ’ ]) !!} bh weather
{ ! ! Form : : c l o s e ( ) ! ! } }}</td>
</d i v> </t r >
</d i v> <t r >
</d i v> <t h s c o p e=” row ”>
</d i v> Maximum
Borehole
@endsection Depth</th>
<td >{{ $ b o r e h o l e −>
bh max depth
}} m. </ td>
Listing 69: boreholes/show.blade.php </t r >
<t r >
@extends ( ’ l a y o u t s / m a s t e r ’ ) <t h s c o p e=” row ”>
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) Hammer Weight
@section ( ’ content ’ ) </th>
<td >{{ $ b o r e h o l e −>
<!−− b o r e h o l e d e t a i l s −−> bh hammer weight
<d i v c l a s s=” row ”> }} kg . </ td>
<d i v c l a s s=” c o l −md−12”> </t r >
<d i v c l a s s=” x p a n e l ”> <t r >
<d i v c l a s s=” x t i t l e ”> <t h s c o p e=” row ”>
<h2> B o r e h o l e {{ $ b o r e h o l e −> Height o f
bh num }} <s m a l l >(ID#{{ Drop</th>
$ b o r e h o l e −>i d } } )</ s m a l l > <td >{{ $ b o r e h o l e −>
</h2> bh height of drop
<u l c l a s s=” nav navbar−r i g h t }} m. </ td>
p a n e l t o o l b o x ”> </t r >
< l i ><a c l a s s=” c o l l a p s e − <t r >
l i n k ”><i c l a s s=” f a f a <t h s c o p e=” row ”>
−c h e v r o n−up”></i ></a> Water
</ l i > E l e v a t i o n </th
< l i c l a s s=” dropdown ”> >
<a h r e f=”#” c l a s s=” <td >{{ $ b o r e h o l e −>
dropdown−t o g g l e ” bh water elevation
data−t o g g l e=” }} m. </ td>
dropdown ” r o l e=” </t r >
button ” aria − <t r >
expanded=” f a l s e ” <t h s c o p e=” row ”>
><i c l a s s=” f a f a − Surface
wrench ”></i ></a> E l e v a t i o n </th
<u l c l a s s=” dropdown− >
menu” r o l e=”menu” <td >{{ $ b o r e h o l e −>
> bh surface elevation
< l i ><a h r e f=”#”> }} m. </ td>
S e t t i n g s 1</a </t r >
> </ t a b l e >
</ l i > <d i v c l a s s=” l n s o l i d ”></
< l i ><a h r e f=”#”> d i v>
S e t t i n g s 2</a </d i v>
> <d i v c l a s s=” c o l −md−6 c o l −md−6
</ l i > c o l −xs −12”>
</u l > <t a b l e c l a s s=” t a b l e t a b l e −
</ l i > s t r i p e d t a b l e −h o v e r ”
</u l > c e l l p a d d i n g=” 10 ”>
<d i v c l a s s=” c l e a r f i x ”></d i v> <t r >
</d i v> <t h s c o p e=” row ”>
<d i v c l a s s=” x c o n t e n t ”> O p e r a t o r </th>
<d i v c l a s s=” c o l −md−6 c o l −md−6 <td >{{ $ b o r e h o l e −>
c o l −xs −12”> bh operator
<t a b l e c l a s s=” t a b l e t a b l e − }}</td>
s t r i p e d t a b l e −h o v e r ” </t r >
c e l l p a d d i n g=” 10 ”> <t r >
<t r > <t h s c o p e=” row ”>
<?php I n s p e c t o r </th
$myDateTime = >
DateTime : : <td >{{ $ b o r e h o l e −>
createFromFormat bh inspector
( ’Y−m−d ’ , }}</td>
$ b o r e h o l e −> </t r >
bh start date <t r >
); <t h s c o p e=” row ”>
$start date = D r i l l Rig </th
$myDateTime−> >
format ( ’F d , <td >{{ $ b o r e h o l e −>
Y’ ) ; bh drill rig
$myDateTime = }}</td>
DateTime : : </t r >
createFromFormat <t r >
( ’Y−m−d ’ , <t h s c o p e=” row ”>
$ b o r e h o l e −> D r i l l Pump</
bh end date ) ; th>
$end date = <td >{{ $ b o r e h o l e −>
111
bh drill pump </u l >
}}</td> <d i v c l a s s=” c l e a r f i x ”></d i v>
</t r > </d i v>
<t r > <d i v c l a s s=” x c o n t e n t ”>
<t h s c o p e=” row ”> @if ( sizeof ( $samples ) > 0)
Casing </th> <t a b l e c l a s s=” t a b l e t a b l e −
<td >{{ $ b o r e h o l e −> s t r i p e d t a b l e −h o v e r ”
bh casing c e l l p a d d i n g=” 10 ”>
}}</td> <thead>
</t r > <th>No. </ th>
<t r > <th>Depth</th>
<t h s c o p e=” row ”> <th>S o i l
Rod</th> C l a s s i f i c a t i o n </
<td >{{ $ b o r e h o l e −> th>
b h r o d }}</td <th>C o l o r </th>
> <th>Length o f Sample</
</t r > th>
<t r > <th>No . o f Blows <
<t h s c o p e=” row ”> s m a l l >SPT N−Value
Sampler </th> </s m a l l ></th>
<td >{{ $ b o r e h o l e −> <th>L i q u i d L i m i t </th>
bh sampler <th>P l a s t i c L i m i t </th>
}}</td> <th>P l a s t i c i t y Index </
</t r > th>
</ t a b l e > <t h c o l s p a n=” 3 ”>
<d i v c l a s s=” l n s o l i d ”></ O p t i o n s </th>
d i v> </thead>
</d i v>
<a h r e f=” {{ r o u t e ( ’ b o r e h o l e s . <tbody>
e d i t ’ , $ b o r e h o l e −>i d ) }} ” @foreach ( $samples as
c l a s s=” btn btn−i n f o ” $sample )
s t y l e=” f l o a t : r i g h t ”><i <t r >
c l a s s=” f a f a −e d i t m−r i g h t <t h s c o p e=” row ”>{{
−x s ”></i > E d i t B o r e h o l e $sample−>
{{ $ b o r e h o l e −>bh num }} ( sample num
ID#{{ $ b o r e h o l e −>i d } } )</ }}</th>
a> <td >{{ $sample−>
<a h r e f=” {{ r o u t e ( ’ s a m p l e s . sample from
c r e a t e ’ , $ b o r e h o l e −>i d ) }} m. − {{
}} ” c l a s s=” btn btn− $sample−>
p r i m a r y ” s t y l e=” f l o a t : s a m p l e t o }}
r i g h t ”><i c l a s s=” f a f a − m. </ td>
p l u s m−r i g h t −x s ”></i > Add <td >{{ $sample−>
Sample</a> u s c s i d }}</
{ ! ! Form : : open ( [ ’ method ’ => ’ td>
DELETE ’ , ’ r o u t e ’ => [ ’ <td >{{ $sample−>
boreholes . destroy ’ , sample color
$ b o r e h o l e −>i d ] , ’ o n su b m it }}</td>
’ => ’ r e t u r n c o n f i r m ( ” <td >{{ $sample−>
Delete borehole ’ . sample sample length
$ b o r e h o l e −>bh num . ’ i n }} m. </ td>
p r o j e c t ’ . $ p r o j e c t −> <td >{{ $sample−>
proj name . ’ permanently sample num of blows
?”) ’ ] ) ! ! } }}</td>
{ ! ! Form : : s u b m i t ( ’ D e l e t e ’ , [ ’ <td >{{ $sample−>
c l a s s ’ => ’ btn btn−d a n g e r sample liquid limit
’ ]) !!} }} %</td>
{ ! ! Form : : c l o s e ( ) ! ! } <td >{{ $sample−>
<d i v c l a s s=” l n s o l i d ”></d i v> sample plastic limit
</d i v> }} %</td>
</d i v> <td >{{ $sample−>
</d i v> sample plasticity index
</d i v> }} %</td>
<!−− / b o r e h o l e d e t a i l s −−> <td>
<b u t t o n t y p e=”
<!−− s a m p l e d e t a i l s −−> button ”
<d i v c l a s s=” row ”> c l a s s=”
<d i v c l a s s=” c o l −md−12”> open−
<d i v c l a s s=” x p a n e l ”> modal btn
<d i v c l a s s=” x t i t l e ”> btn−
<h2> Samples </h2> primary
<u l c l a s s=” nav navbar−r i g h t btn−x s ”
p a n e l t o o l b o x ”> data−
< l i ><a c l a s s=” c o l l a p s e − t o g g l e=”
l i n k ”><i c l a s s=” f a f a modal ”
−c h e v r o n−up”></i ></a> data−
</ l i > t a r g e t=” .
< l i c l a s s=” dropdown ”> bs−
<a h r e f=”#” c l a s s=” example−
dropdown−t o g g l e ” modal−l g ”
data−t o g g l e=” data−i d=
dropdown ” r o l e=” ” {{
button ” aria − $sample
expanded=” f a l s e ” }} ”><i
><i c l a s s=” f a f a − c l a s s=” f a
wrench ” </i ></a> f a −e y e ”
<u l c l a s s=” dropdown− ></i >
menu” r o l e=”menu” View </
> button>
< l i ><a h r e f=”#”> </td>
S e t t i n g s 1</a <td>
> <a h r e f=” {{
</ l i > route ( ’
< l i ><a h r e f=”#”> samples .
S e t t i n g s 2</a edit ’ ,
> $sample−>
</ l i > i d ) }} ”
</u l > c l a s s=”
</ l i > btn btn−
112
i n f o btn− <t a b l e
x s ”><i class
c l a s s=” f a =”
f a −e d i t table
m−r i g h t
x s ”></i > table
E d i t </a> −
</td> striped
<td>
{ ! ! Form : : open table
( [ ’ method −
’ => ’ hover
DELETE ’ , ”
’ route ’ cellpadding
=> [ ’ =” 10 ”
samples . >
destroy ’ , <t r >
$sample <
−>i d ] , ’ th
o ns u b mi t ’
=> ’ scope
return =
confirm (” ”
Delete row
sample ’ . ”
$sample >
−> Depth
sample num </
. ’ in th
project ’ >
.
$project <
−> td
proj name ><
. ’ span
permanently
?”) ’ ] ) class
!!} =
{ ! ! Form : : ”
submit ( ’ depth
Delete ’ , ”
[ ’ class ’ ></
=> ’ btn span
btn− ></
danger td
btn−x s ’ ] ) >
!!}
{ ! ! Form : : </t r >
close () <t r >
!!} <
</td> th
</t r >
endforeach scope
</tbody> =
</ t a b l e > ”
row
<d i v c l a s s=” modal f a d e bs− ”
example−modal−l g ” >
t a b i n d e x=”−1” r o l e=” Soil
d i a l o g ” a r i a −h i d d e n=” t r u e
”> Classification
<d i v c l a s s=” modal−d i a l o g </
modal−l g ”> th
<d i v c l a s s=” modal− >
c o n t e n t ”>
<
<d i v c l a s s=” modal− td
h e a d e r ”> ><
<b u t t o n t y p e=” span
button ”
c l a s s=” class
close ” =
data− ”
d i s m i s s=” uscs id
modal ”>< ”
span a r i a ></
−h i d d e n=” span
t r u e ”> ></
</span> td
</button> >
<h4 c l a s s=”
modal− </t r >
t i t l e ” id <t r >
=” <
myModalLabel th
”><span
c l a s s=” scope
sample title =
”></span ”
></h4> row
</d i v> ”
<d i v c l a s s=” modal− >
body e d i t − Soil
c o n t e n t ”>
<d i v c l a s s=” Description
c o l −md−6 </
c o l −md−6 th
c o l −xs −12 >
”>
113
< th
td >
><
span <
td
class ><
= span
”
uscs description class
” =
></ ”
span sample color
></ ”
td ></
> span
></
</t r > td
<t r > >
<
th </t r >
<t r >
scope <
= th
”
row scope
” =
> ”
Contract row
”
No >
. </ Length
th
> of
< Run
td </
>< th
span >
class <
= td
” ><
sample contract num span
”
></ class
span =
></ ”
td sample run leng
> ”
></
</t r > span
<t r > ></
< td
th >
< of
td
>< Sample
span </
th
class >
=
” <
sample job num td
” ><
></ span
span
></ class
td =
> ”
sample sample
</t r > ”
<t r > ></
< span
th ></
td
scope >
=
” </t r >
row <t r >
” <
> th
Soil
scope
Color =
</ ”
114
row <
” th
>
Rec scope
. </ =
th ”
> row
”
< >
td Type
><
span of
class Sampling
= </
” th
sample rec percent >
”
></ <
span td
></ ><
td span
>
class
</t r > =
</ t a b l e > ”
<d i v c l a s s sample type of
=” ”
ln solid ></
”></ span
d i v> ></
</d i v> td
<d i v c l a s s=” >
c o l −md−6
c o l −md−6 </t r >
c o l −xs −12 <t r >
”> <
<t a b l e th
class
=” scope
table =
”
table row
− ”
striped >
NMC
table </
− th
hover >
”
cellpadding <
=” 10 ” td
> ><
<t r > span
<
th class
=
scope ”
= sample nmc per
” ”
row ></
” span
> ></
No td
. >
of </t r >
<t r >
Blows <
th
(
SPT scope
=
N ”
− row
Value ”
) >
</ Liquid
th
> Limit
</
< th
td >
><
span <
td
class ><
= span
”
sample num of blows class
” =
></ ”
span sample liquid
></ ”
td ></
> span
></
</t r > td
<t r > >
115
></
</t r > td
<t r > >
<
th </t r >
<t r >
scope <
= th
”
row scope
” =
> ”
Plastic row
”
Limit >
</ Liquid
th
> and
< Plastic
td
>< Limits
span
Tester
class </
= th
” >
sample plastic limit
” <
></ td
span ><
></ span
td
> class
=
</t r > ”
<t r > sample tester
< ”
th ></
span
scope ></
= td
” >
row
” </t r >
> <t r >
Plasticity <
th
Index
</ scope
th =
> ”
row
< ”
td >
>< Other
span
Test
class
= Results
” </
sample plasticity index th
” >
></
span <
></ td
td ><
> span
116
td ]) ;
>< $ ( ’ . s a m p l e t y p e o f s a m p l i n g ’ ) . html
span ( sample [ ’
sample type of sampling ’ ] ) ;
class $ ( ’ . s a m p l e n m c p e r c e n t ’ ) . html (
= sample [ ’ sample nmc percent ’ ] )
” ;
sample test d $a( t’ e. s a m p l e l i q u i d l i m i t ’ ) . html (
” sample [ ’ s a m p l e l i q u i d l i m i t ’
></ ]) ;
span $ ( ’ . s a m p l e p l a s t i c l i m i t ’ ) . html (
></ sample [ ’ s a m p l e p l a s t i c l i m i t ’
td ]) ;
> $ ( ’ . s a m p l e p l a s t i c i t y i n d e x ’ ) . html
( sample [ ’
</t r > sample plasticity index ’ ]) ;
</ t a b l e > $( ’ . sample plasticity remark ’ ) .
<d i v c l a s s html ( s a m p l e [ ’
=” sample plasticity remark ’ ]) ;
ln solid $ ( ’ . s a m p l e t e s t e r ’ ) . html ( s a m p l e [ ’
”></ sample tester ’ ]) ;
d i v> $ ( ’ . s a m p l e o t h e r r e s u l t s ’ ) . html (
</d i v> sample [ ’ s a m p l e o t h e r r e s u l t s ’
</d i v> ]) ;
<d i v c l a s s=” modal− $ ( ’ . s a m p l e t e s t d a t e ’ ) . html ( s a m p l e
f o o t e r ”> [ ’ sample test date ’ ]) ;
<b u t t o n t y p e=” }) ;
button ” </ s c r i p t >
c l a s s=” @endsection
btn btn−
default ”
data−
d i s m i s s=”
modal ”
Listing 70: datapoints/create.blade.php
s t y l e=> @extends ( ’ l a y o u t s / m a s t e r ’ )
C l o s e </ @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
button> @section ( ’ content ’ )
<b u t t o n t y p e=”
button ” <d i v c l a s s=” row ”>
c l a s s=” <d i v c l a s s=” c o l −md−12”>
btn btn− <d i v c l a s s=” x p a n e l ”>
p r i m a r y ”> <d i v c l a s s=” x t i t l e ”>
Save <h2>Add G r ai n S i z e A n a l y s i s </
c h a n g e s </ h2>
button> <u l c l a s s=” nav navbar−r i g h t
<d i v c l a s s=” p a n e l t o o l b o x ”>
ln solid” < l i ><a c l a s s=” c o l l a p s e −
></d i v> l i n k ”><i c l a s s=” f a f a
</d i v> −c h e v r o n−up”></i ></a>
</d i v> </ l i >
</d i v> < l i c l a s s=” dropdown ”>
</d i v> <a h r e f=”#” c l a s s=”
@else dropdown−t o g g l e ”
<c e n t e r ><h2>T h i s b o r e h o l e h a s data−t o g g l e=”
no s a m p l e s . </h2></c e n t e r > dropdown ” r o l e=”
@endif button ” aria −
<d i v c l a s s=” l n s o l i d ”></d i v> expanded=” f a l s e ”
</d i v> ><i c l a s s=” f a f a −
</d i v> wrench ”></i ></a>
</d i v> <u l c l a s s=” dropdown−
</d i v> menu” r o l e=”menu”
<!−− / s a m p l e d e t a i l s −−> >
< l i ><a h r e f=”#”>
@endsection S e t t i n g s 1</a
>
@section ( ’ j s ’ ) </ l i >
@parent < l i ><a h r e f=”#”>
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”> S e t t i n g s 2</a
$ ( document ) . on ( ” c l i c k ” , ” . open−modal ” , >
function () { </ l i >
var sample = $ ( t h i s ) . data ( ’ i d ’ ) ; </u l >
$ ( ’ . s a m p l e t i t l e ’ ) . html ( ’ Sample ’ </ l i >
+ s a m p l e [ ’ sample num ’ ] + ’ < </u l >
s m a l l >(ID# ’ + s a m p l e [ ’ i d ’ ] + <d i v c l a s s=” c l e a r f i x ”></
’ )</s m a l l > ’ ) ; d i v>
$ ( ’ . d e p t h ’ ) . html ( s a m p l e [ ’ </d i v>
s a m p l e f r o m ’ ] + ’ m. − ’ +
s a m p l e [ ’ s a m p l e t o ’ ] + ’ m. ’ ) ; <d i v c l a s s=” x c o n t e n t ”>
$ ( ’ . u s c s i d ’ ) . html ( s a m p l e [ ’ u s c s i d
’ ]) ; @if ( $counts > 0)
$ ( ’ . u s c s d e s c r i p t i o n ’ ) . html ( s a m p l e { ! ! Form : : open ( [ ’ name ’ => ’
[ ’ uscs description ’ ]) ; s t o r e f o r m ’ , ’ method ’ =>
$ ( ’ . s a m p l e c o n t r a c t n u m ’ ) . html ( ’POST ’ , ’ r o u t e ’ => ’
sample [ ’ sample contract num ’ datapoints . store ’ , ’ c l a s s
]) ; ’ => ’ form−h o r i z o n t a l
$ ( ’ . s a m p l e j o b n u m ’ ) . html ( s a m p l e [ ’ form−l a b e l − l e f t ’ ] ) ! ! }
sample job num ’ ] ) ; <?php $ c l a s s n u m = 0 ?>
$ ( ’ . s a m p l e c o l o r ’ ) . html ( s a m p l e [ ’ @for ( $ i = 0 ; $ i < s i z e o f (
sample color ’ ] ) ; $ c o u n t s ) ; $ i ++)
$ ( ’ . s a m p l e r u n l e n g t h ’ ) . html ( <h4 a l i g n=” c e n t e r ”>
sample [ ’ s a m p l e r u n l e n g t h ’ ] ) ; B o r e h o l e {{ $ i + 1 }}
$ ( ’ . s a m p l e s a m p l e l e n g t h ’ ) . html ( <s m a l l > { ! ! l i n k t o r o u t e ( ’
sample [ ’ s a m p l e s a m p l e l e n g t h ’ b o r e h o l e s . show ’ , ’ ( ID
]) ; #’ . $ bo r eh o le s [ $ i ] .
$ ( ’ . s a m p l e r e c p e r c e n t ’ ) . html ( ’ ) ’ , $boreholes [ $i ] ,
sample [ ’ s a m p l e r e c p e r c e n t ’ ] ) array ( ’ c l a s s ’ => ’
; t o l o g i n ’ ) ) !!} </
$ ( ’ . s a m p l e n u m o f b l o w s ’ ) . html ( small>
sample [ ’ sample num of blows ’ </h4>
117
<t a b l e c l a s s=” t a b l e t a b l e − ]
h o v e r ” i d=” t a b l e {{ $ i
}} ”> .
<thead>
<t r > ’
<th>Sample</th )
> ’
<th>G r ai n ,
Diameter
(mm)</th> $counts
<th>P e r c e n t a g e [
F i n e r </ $i
th> ][
<t h w i d t h=”18% $j
”>Data ],
Points
O p t i o n s </ array
th> (
</t r > ’
</thead> class
<tbody> ’
@for ( $ j = 0 ; $ j <
sizeof ( =>
$counts [ $i ] ) ;
$ j ++) ’
<t r > to login
<t h s c o p e= ’
” row ” )
)
style
=” !!} </
border small
−t o p >
: 1 px </th>
solid <t d s t y l e=
; ”> ”
{{ $ j border
+ −t o p
: 1 px
1 solid
; ”><
}} input
type
<i n p u t =”
number
type ”
= name=
” ”
hidden x int
” []”
class
name =”
= form−
” control
sample id
[] to clear
” col−
md−7
value col−
= xs −12
” ”
{{ s t e p=
” any ”
$counts
[ required
$i ></td
][ >
$j <t d s t y l e=
] ”
border
}} −t o p
” : 1 px
> solid
; ”><
<s m a l l input
>{!! type
=”
link to route number
( ”
’ name=
samples ”
. y int
show []”
’ class
, =”
form−
’ control
(
ID to clear
# col−
’ md−7
col−
. xs −12
”
$counts s t e p=
[ ” any ”
$i
][ required
$j ></td
118
>
<t d s t y l e= </
” button
border >
−t o p </td>
: 1 px </t r >
solid <?php $ c l a s s n u m++
; ”> ?>
< @endfor
button
</ t a b l e >
type @endfor
<d i v c l a s s=” l n s o l i d ”></d i v>
= { ! ! Form : : h i d d e n ( ’ p r o j i d ’ , $ p r o j e c t −>
” id ) ! ! }
button { ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ Back ’ ,
” array ( ’ c l a s s ’ => ’ btn btn−d e f a u l t
’)) !!}
onclick { ! ! Form : : b u t t o n ( ’ C l e a r ’ , [ ’ c l a s s ’ =>
’ btn btn−d a n g e r ’ , ’ o n c l i c k ’ => ’
= clearForm ( ) ’ ] ) ! ! }
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’ c l a s s ’ =>
” ’ btn btn−p r i m a r y ’ , ’ s t y l e ’ => ’
addRow float : right ’ ]) !!}
( { ! ! Form : : c l o s e ( ) ! ! }
this @else
, { ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ Back ’ ,
array ( ’ c l a s s ’ => ’ btn btn−d e f a u l t
{{ ’)) !!}
@endif
$class num
</d i v>
} } , </d i v>
</d i v>
{{ </d i v>
$counts
[ @endsection
$i
][ @section ( ’ j s ’ )
$j @parent
] @include ( ’ i n c l u d e s / clearform ’ )
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”>
}}) // $ ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( ) {
”
f u n c t i o n addRow ( p a r a m e t e r ,
class class num , sample id ) {
=
” $ ( ” . ”+c l a s s n u m+” ” ) . a d d C l a s s ( ”
{{ previous ”) ;
m to clear
−
right col
− −
sm md
” −7
></
i col
> −
xs
Add −12 ’
119
step +
=’
any class num
’></
td +
>
” ”
+ btn
” btn
< −
td info
><
input btn
−
type sm
=’
number addBtn
’ ’
name style
=’ =’
y int float
[] ’ :
left
class ;
=’
form width
− :70
control px
;’><
to clear i
col class
− =’
md fa
−7
fa
col −
− plus
xs
−12 ’ m
−
step right
=’ −
any sm
’></ ’></
td i
> >
”
Add
+
</
” button
< >
td ”
><
button + ”<b u t t o n t y p e =’
button ’ o n c l i c k =
type ’ removeRow ( t h i s ,
=’ ” + class num +
button ” , ” + sample id
’ + ” ) ; ’ c l a s s =’ btn
btn−d a n g e r btn−
onclick sm ’ s t y l e =’ f l o a t :
=’ c e n t e r ; width : 7 0
addRow px;’>< i c l a s s =’ f a
( f a −t r a s h −o m−
this r i g h t −sm’></ i >
, D e l e t e </button
></td>”
” + ”</
tr
+ >
”
class num )
;
+
// D e l e t e p r e v i o u s add b u t t o n
” $ ( ” . p r e v i o u s ” ) . c l o s e s t ( ” button
, ” ) . remove ( ) ;
}
”
f u n c t i o n removeRow ( p a r a m e t e r ,
+ class num , sample id ) {
120
. f i n d ( ” button ” ) . hasClass ( </h4>
” addBtn ” ) ) { <t a b l e c l a s s=” t a b l e t a b l e −
c u r r e n t r o w t d . append ( ”< h o v e r ” i d=” t a b l e {{ $ i }} ”
b u t t o n t y p e =’ b u t t o n ’ >
o n c l i c k =’addRow ( t h i s , <thead>
” + class num + ” , ” <t r >
+ sample id + ”) ; ’ <th>Sample</th>
c l a s s =’ ” + c l a s s n u m <th>G r ai n D i a m e t e r
+ ” btn btn−i n f o btn− (mm)</th>
sm addBtn ’ s t y l e =’ <th>P e r c e n t a g e
f l o a t : l e f t ; width : 7 0 F i n e r </th>
px;’>< i c l a s s =’ f a f a − </t r >
p l u s m−r i g h t −x s ’></ i > </thead>
Add </button>” ) ; <tbody>
} <?php $ p r e v s a m p l e i d
= 0 ?>
// Remove row @foreach ( $samples as
c u r r e n t r o w . remove ( ) ; $sample )
@ i f ( $sample−>b h i d ==
} $ b o r e h o l e −>i d )
@foreach ( $ d a t a p o i n t s
// } ) ; as $data point )
@ i f ( $ d a t a p o i n t −>
</ s c r i p t > s a m p l e i d ==
@endsection $sample−>i d )
@ i f ( $ p r e v s a m p l e i d !=
$sample−>i d )
<?php $ t d s t y l e = ”
Listing 71: datapoints/edit.blade.php b o r d e r −t o p : 1 px
s o l i d ; ” ?>
@extends ( ’ l a y o u t s / m a s t e r ’ ) @else
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) <?php $ t d s t y l e = ” ”
@section ( ’ content ’ ) ?>
<d i v c l a s s=” row ”> @endif
<d i v c l a s s=” c o l −md−12”> <t r >
<d i v c l a s s=” x p a n e l ”> <t h s c o p e=” row ”
<d i v c l a s s=” x t i t l e ”> s t y l e=” {{
<h2>E d i t Gr a i n S i z e A n a l y s i s </ $ t d s t y l e }} ”
h2> >
<u l c l a s s=” nav navbar−r i g h t @if (
p a n e l t o o l b o x ”> $prev sample id
< l i ><a c l a s s=” c o l l a p s e − !=
l i n k ”><i c l a s s=” f a f a $sample−>
−c h e v r o n−up”></i ></a> id )
</ l i > {{ $sample−>
< l i c l a s s=” dropdown ”> sample num
<a h r e f=”#” c l a s s=” }}
dropdown−t o g g l e ” <s m a l l > { ! !
data−t o g g l e=” link to route
dropdown ” r o l e=” ( ’ samples
button ” aria − . show ’ , ’
expanded=” f a l s e ” ( ID# ’ .
><i c l a s s=” f a f a − $sample−>
wrench ”></i ></a> id . ’ ) ’ ,
<u l c l a s s=” dropdown− $sample
menu” r o l e=”menu” −>i d ,
> array ( ’
< l i ><a h r e f=”#”> c l a s s ’ =>
S e t t i n g s 1</a ’
> to login ’
</ l i > ) ) !!} </
< l i ><a h r e f=”#”> small>
S e t t i n g s 2</a { ! ! Form : :
> hidden ( ’
</ l i > sample id
</u l > [] ’ ,
</ l i > $sample−>
</u l > id ) ! ! }
<d i v c l a s s=” c l e a r f i x ”></d i v> { ! ! Form : :
</d i v> hidden ( ’
<d i v c l a s s=” x c o n t e n t ”> data point id
@ i f ( s i z e o f ( $ b o r e h o l e s ) == 0 ) [] ’ ,
<h4 a l i g n=” c e n t e r ”>There a r e $data point
no e x i s t i n g s a m p l e s . </h4> −>i d ) ! ! }
@else @else
{ ! ! Form : : open ( [ ’ name ’ => ’ { ! ! Form : :
u p d a t e f o r m ’ , ’ method ’ => hidden ( ’
’PUT ’ , ’ r o u t e ’ => [ ’ sample id
d a t a p o i n t s . update ’ , [] ’ ,
$ s u b r e p o r t −>i d ] , ’ c l a s s ’ $sample−>
=> ’ form−h o r i z o n t a l form− id ) ! ! }
l a b e l − l e f t ’ , ’ i d ’ => ’ { ! ! Form : :
update form ’ ] ) ! ! } hidden ( ’
<?php data point id
$class num = 0; [] ’ ,
$i = 0; $data point
?> −>i d ) ! ! }
@foreach ( $ b o r e h o l e s as @endif
$borehole ) </th>
<h4 a l i g n=” c e n t e r ”> <t d s t y l e=” {{
B o r e h o l e {{ $ b o r e h o l e −> $ t d s t y l e }} ”
bh num }} ><i n p u t t y p e=
<s m a l l > { ! ! l i n k t o r o u t e ( ’ ” number ” name
b o r e h o l e s . show ’ , ’ ( ID =” x i n t [ ] ”
# ’ . $ b o r e h o l e −>i d . c l a s s=” form−
’ ) ’ , $ b o r e h o l e −>i d , control
array ( ’ c l a s s ’ => ’ t o c l e a r col−
t o l o g i n ’ ) ) !!} </ md−7 c o l −xs
small> −12” s t e p=”
121
any ” v a l u e=” </u l >
{{ </ l i >
$ d a t a p o i n t −> </u l >
x i n t }} ” <d i v c l a s s=” c l e a r f i x ”></d i v>
r e q u i r e d ></td </d i v>
> <d i v c l a s s=” x c o n t e n t ”>
<t d s t y l e=” {{ @ i f ( s i z e o f ( $ b o r e h o l e s ) == 0 )
$ t d s t y l e }} ” <h4 a l i g n=” c e n t e r ”>There a r e
><i n p u t t y p e= no e x i s t i n g s a m p l e s . </h4>
” number ” name @else
=” y i n t [ ] ” <?php $ i = 0 ?>
c l a s s=” form− @foreach ( $ b o r e h o l e s as
control $borehole )
t o c l e a r col− <h4 a l i g n=” c e n t e r ”>
md−7 c o l −xs B o r e h o l e {{ $ b o r e h o l e −>
−12” s t e p=” bh num }}
any ” v a l u e=” <s m a l l > { ! ! l i n k t o r o u t e ( ’
{{ b o r e h o l e s . show ’ , ’ ( ID
$ d a t a p o i n t −> # ’ . $ b o r e h o l e −>i d .
y i n t }} ” ’ ) ’ , $ b o r e h o l e −>i d ,
r e q u i r e d ></td array ( ’ c l a s s ’ => ’
> t o l o g i n ’ ) ) !!} </
</t r > small>
<?php $ p r e v s a m p l e i d </h4>
= $sample−>i d ?> <t a b l e c l a s s=” t a b l e t a b l e −
@endif h o v e r ” i d=” t a b l e {{ $ i }} ”
@endforeach >
@endif <thead>
<?php $ c l a s s n u m++ ?> <t r >
@endforeach <th>Sample</th>
</tbody> <th>G r ai n D i a m e t e r
</ t a b l e > (mm)</th>
<?php $ i++ ?> <th>P e r c e n t a g e
@endforeach F i n e r </th>
<d i v c l a s s=” l n s o l i d ”></d i v> </t r >
{ ! ! Form : : h i d d e n ( ’ p r o j i d ’ , </thead>
$ p r o j e c t −>i d ) ! ! } <tbody>
{ ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ <?php $ p r e v s a m p l e i d
Back ’ , array ( ’ c l a s s ’ => ’ = 0 ?>
btn btn−d e f a u l t ’ ) ) ! ! } @foreach ( $samples as
{ ! ! Form : : b u t t o n ( ’ C l e a r ’ , [ ’ $sample )
c l a s s ’ => ’ btn btn−d a n g e r @ i f ( $sample−>b h i d ==
’ , ’ o n c l i c k ’ => ’ $ b o r e h o l e −>i d )
clearForm ( ) ’ ] ) ! ! } @foreach ( $ d a t a p o i n t s
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’ as $data point )
c l a s s ’ => ’ btn btn− @ i f ( $ d a t a p o i n t −>
p r i m a r y ’ , ’ s t y l e ’ => ’ s a m p l e i d ==
float : right ’ ]) !!} $sample−>i d )
{ ! ! Form : : c l o s e ( ) ! ! } @ i f ( $ p r e v s a m p l e i d !=
@endif $sample−>i d )
</d i v> <?php $ t d s t y l e = ”
</d i v> b o r d e r −t o p : 1 px
</d i v> s o l i d ; ” ?>
</d i v> @else
@endsection <?php $ t d s t y l e = ” ”
@section ( ’ j s ’ ) ?>
@parent @endif
@include ( ’ i n c l u d e s / clearform ’ ) <t r >
@endsection <t h s c o p e=” row ”
s t y l e=” {{
$ t d s t y l e }} ”
>
Listing 72: datapoints/index.blade.php @if (
$prev sample id
@extends ( ’ l a y o u t s / m a s t e r ’ ) !=
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) $sample−>
@section ( ’ content ’ ) id )
<d i v c l a s s=” row ”> {{ $sample−>
<d i v c l a s s=” c o l −md−12”> sample num
<d i v c l a s s=” x p a n e l ”> }}
<d i v c l a s s=” x t i t l e ”> <s m a l l > { ! !
<h2>G ra i n S i z e A n a l y s i s − Data link to route
P o i n t s </h2> ( ’ samples
<u l c l a s s=” nav navbar−r i g h t . show ’ , ’
p a n e l t o o l b o x ”> ( ID# ’ .
< l i ><a c l a s s=” c o l l a p s e − $sample−>
l i n k ”><i c l a s s=” f a f a id . ’ ) ’ ,
−c h e v r o n−up”></i ></a> $sample
</ l i > −>i d ,
< l i c l a s s=” dropdown ”> array ( ’
<a h r e f=”#” c l a s s=” c l a s s ’ =>
dropdown−t o g g l e ” ’
data−t o g g l e=” to login ’
dropdown ” r o l e=” ) ) !!} </
button ” aria − small>
expanded=” f a l s e ” @endif
><i c l a s s=” f a f a − </th>
wrench ”></i ></a> <t d s t y l e=” {{
<u l c l a s s=” dropdown− $ t d s t y l e }} ”
menu” r o l e=”menu” >{{
> $ d a t a p o i n t −>
< l i ><a h r e f=”#”> x i n t }}</td>
S e t t i n g s 1</a <t d s t y l e=” {{
> $ t d s t y l e }} ”
</ l i > >{{
< l i ><a h r e f=”#”> $ d a t a p o i n t −>
S e t t i n g s 2</a y i n t }}</td>
> </t r >
</ l i > <?php $ p r e v s a m p l e i d
122
= $sample−>i d ?> deep pile size ’ + i)
@endif . val () ;
@endforeach
@endif a s u r f a c e = 4∗ p i l e s i z e ∗ d f ;
@endforeach $ ( ’#d e e p A s u r f a c e ’ + i +
</tbody> ’ ’ + j ) . val (
</ t a b l e > parseFloat ( asurface .
<?php $ i++ ?> toFixed (4) ) ) ;
@endforeach
<d i v c l a s s=” l n s o l i d ”></d i v> // Compute A t i p
{ ! ! Form : : open ( [ ’ method ’ => ’ atip = p i l e s i z e ∗ p i l e s i z e
DELETE ’ , ’ r o u t e ’ => [ ’ ;
datapoints . destroy ’ , $ ( ’#d e e p A t i p ’ + i + ’ ’
$ s u b r e p o r t −>i d ] , ’ + j ) . val ( parseFloat (
o n su b mi t ’ => ’ r e t u r n atip . toFixed (4) ) ) ;
confirm (” Delete grain
s i z e a n a l y s i s permanently // Compute Q t o t a l
?”) ’ ] ) ! ! } q = $ ( ’#d e e p q ’ + i + ’ ’
{ ! ! Form : : s u b m i t ( ’ D e l e t e ’ , [ ’ + j ) . val () ;
c l a s s ’ => ’ btn btn−d a n g e r
’ ]) !!} q t o t a l = f ∗ a s u r f a c e+q∗ a t i p
<a h r e f=” {{ r o u t e ( ’ d a t a p o i n t s . ;
e d i t ’ , $ p r o j e c t −>i d ) }} ” $ ( ’#d e e p Q t o t a l ’ + i + ’
c l a s s=” btn btn−i n f o ” ’ + j ) . val ( parseFloat
s t y l e=” f l o a t : r i g h t ”><i ( q t o t a l . toFixed (4) ) ) ;
c l a s s=” f a f a −e d i t m−r i g h t
−x s ”></i > E d i t </a> // Compute Q ( kN )
{ ! ! Form : : c l o s e ( ) ! ! } f s = $ ( ’#d e e p f s ’ + i ) .
@endif val () ;
</d i v>
</d i v> q kn = q t o t a l / f s ;
</d i v> $ ( ’#d e e p Q k n ’ + i + ’ ’
</d i v> + j ) . val ( parseFloat (
@endsection q kn . toFixed ( 4 ) ) ) ;
// Compute Q ( t o n )
// Q kn ∗ 0 . 1 0 2 1 9
Listing 73: deeps/calculate.blade.php q ton = q kn ∗ 0 . 1 0 2 1 9 ;
@include ( ’ i n c l u d e s / clearform ’ ) $ ( ’#d e e p Q t o n ’ + i + ’ ’
+ j ) . val ( parseFloat (
<!−− t o o l t i p −−> q ton . toFixed (4) ) ) ;
<s c r i p t >
$ ( document ) . r e a d y ( f u n c t i o n ( ) { // Compute c o n c r e t e
$ ( ’ [ data−t o g g l e =” t o o l t i p ” ] ’ ) . t o o l t i p ( ) s t r e n g t h ( kN )
; f c = $ ( ’#d e e p f c ’ + i ) .
}) ; val () ;
</ s c r i p t > r h o = $ ( ’#d e e p r h o ’ + i ) .
<!−− / t o o l t i p −−> val () ;
f y = $ ( ’#d e e p f y ’ + i ) .
<!−− c a l c u l a t e −−> val () ;
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”>
v a r n u m o f b o r e h o l e s = <?php echo cs kn = (( ( p i l e s i z e ∗
s i z e o f ( $ b o r e h o l e s ) ? >; pile size )
var num of samples ; ∗(1000∗1000)
v a r m u l t i p l i e r , d f , k , gamma , tan , f; ∗ 0 . 8 5 ∗ 0 . 7 ∗ f c ) +((
var p i l e s i z e , a s u r f a c e , a t i p ; pile size∗pile size )
var q , q t o t a l ; ∗(1000∗1000) ∗ rho ∗ f y )
v a r f s , q kn , q t o n ; −(0.85∗0.7∗( p i l e s i z e
v a r f c , rho , f y , c s k n , c s t o n ; ∗pile size )
∗(1000∗1000) ∗ rho ∗ f c ) )
c o n s t l s = 3 . 5 ; // 10 x d i a o f p i l e f o r /1000;
l o o s e sand $ ( ’#
c o n s t d c s = 7 ; // 20 x d i a o f p i e f o r deep concrete strength kn
dense compact sand ’ + i ) . val ( parseFloat
( cs kn . toFixed (4) ) ) ;
function calculate () {
f o r ( i = 1 ; i <= n u m o f b o r e h o l e s ; // Compute c o n c r e t e
i ++) { s t r e n g t h ( ton )
num of samples = $ ( ’ . cs ton = cs kn ∗0.10219;
deep depth ’ + i ) . length ; $ ( ’#
f o r ( j = 1 ; j <= n u m o f s a m p l e s deep concrete strength ton
; j ++) { ’ + i ) . val ( parseFloat
( cs ton . toFixed (4) ) ) ;
// Compute f }
d f = $ ( ’#d e e p d e p t h ’ + i }
+ ’ ’ + j ) . val () ; }
k = $ ( ’#d e e p K ’ + i ) . v a l </ s c r i p t >
() ; <!−− / c a l c u l a t e −−>
gamma = $ ( ’#deep gamma ’ +
i ) . val () ;
tan = $ ( ’#d e e p t a n ’ + i ) .
val () ; Listing 74: deeps/create.blade.php
i f ( df < dcs ) { @extends ( ’ l a y o u t s / m a s t e r ’ )
m u l t i p l i e r = df ; @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
} @section ( ’ content ’ )
else { <d i v c l a s s=” row ”>
m u l t i p l i e r = dcs ; <d i v c l a s s=” c o l −md−12”>
} <d i v c l a s s=” x p a n e l ”>
<d i v c l a s s=” x t i t l e ”>
f = m u l t i p l i e r ∗k∗gamma∗ tan <h2>Deep F o u n d a t i o n <s m a l l >
; Compute s o i l b e a r i n g
$ ( ’#d e e p f ’ + i + ’ ’ + j c a p a c i t y f o r deep
) . val ( parseFloat ( f . f o u n d a t i o n </s m a l l ></h2>
toFixed (4) ) ) ; <u l c l a s s=” nav navbar−r i g h t
p a n e l t o o l b o x ”>
// Compute A s u r f a c e < l i ><a c l a s s=” c o l l a p s e −
p i l e s i z e = $ ( ’# l i n k ”><i c l a s s=” f a f a
123
−c h e v r o n−up”></i ></a> =” t o o l t i p ”
</ l i > t i t l e =” ”>
< l i c l a s s=” dropdown ”> Concrete
<a h r e f=”#” c l a s s=” Strength ( ton
dropdown−t o g g l e ” )</a></th>
data−t o g g l e=” </t r >
dropdown ” r o l e=” </thead>
button ” aria − <tbody>
expanded=” f a l s e ” <t r >
><i c l a s s=” f a f a − <td><i n p u t t y p e=”
wrench ”></i ></a> number ” name=
<u l c l a s s=” dropdown− ”
menu” r o l e=”menu” deep pile size
> [ ] ” c l a s s=”
< l i ><a h r e f=”#”> form−c o n t r o l
S e t t i n g s 1</a to clear ”
> s t e p=” any ”
</ l i > v a l u e=” {{ o l d
< l i ><a h r e f=”#”> (’
S e t t i n g s 2</a deep pile size
> ’ ) }} ” i d=”
</ l i > deep pile size
</u l > {{ $ b o r e h o l e
</ l i > −>bh num }} ”
</u l > r e q u i r e d ></td
<d i v c l a s s=” c l e a r f i x ”></d i v> >
</d i v> <td><i n p u t t y p e=”
<d i v c l a s s=” x c o n t e n t ”> number ” name=
@if ( sizeof ( $samples ) > 0) ” deep K [ ] ”
<?php $ s o i l = [ ” c l a y ” , ” s i l t ” ] c l a s s=” form−
?> control
{ ! ! Form : : open ( [ ’ name ’ => ’ to clear ”
s t o r e f o r m ’ , ’ method ’ => s t e p=” any ”
’POST ’ , ’ r o u t e ’ => ’ d e e p s v a l u e=” {{ o l d
. s t o r e ’ , ’ c l a s s ’ => ’ form ( ’ deep K ’ ) }}
−h o r i z o n t a l form−l a b e l − ” i d=” d e e p K
left ’ ]) !!} {{ $ b o r e h o l e
<?php $ i = 0 ?> −>bh num }} ”
@foreach ( $ b o r e h o l e s as r e q u i r e d ></td
$borehole ) >
{ ! ! Form : : h i d d e n ( ’ b h i d [ ] ’ , <td><i n p u t t y p e=”
$ b o r e h o l e −>i d ) ! ! } number ” name=
{ ! ! Form : : h i d d e n ( ’ ” deep gamma [ ]
num of samples [ ] ’ , ” c l a s s=” form
$ b o r e h o l e −> −c o n t r o l
bh num of samples ) ! ! } to clear ”
<c e n t e r > s t e p=” any ”
<h2>B o r e h o l e {{ $ b o r e h o l e v a l u e=” {{ o l d
−>bh num }} <s m a l l >( ( ’ deep gamma
ID#{{ $ b o r e h o l e −>i d ’ ) }} ” i d=”
} } )</ s m a l l ></h2> deep gamma {{
</ c e n t e r > $ b o r e h o l e −>
<t a b l e c l a s s=” t a b l e t a b l e − bh num }} ”
s t r i p e d t a b l e −h o v e r ”> r e q u i r e d ></td
<thead> >
<t r > <td><i n p u t t y p e=”
<th><a data−t o g g l e number ” name=
=” t o o l t i p ” ” deep tan [ ] ”
t i t l e =” ”>P i l e c l a s s=” form−
S i z e </a></th control
> to clear ”
<th><a data−t o g g l e s t e p=” any ”
=” t o o l t i p ” v a l u e=” {{ o l d
t i t l e =” ”>K</a ( ’ deep tan ’)
></th> }} ” i d=”
<th><a data−t o g g l e d e e p t a n {{
=” t o o l t i p ” $ b o r e h o l e −>
t i t l e =” ”>& bh num }} ”
gamma; </a></ r e q u i r e d ></td
th> >
<th><a data−t o g g l e <td><i n p u t t y p e=”
=” t o o l t i p ” number ” name=
t i t l e =” ”>tan& ” deep fs [ ] ”
d e l t a ; </a></ c l a s s=” form−
th> control
<th><a data−t o g g l e to clear ”
=” t o o l t i p ” s t e p=” any ”
t i t l e =” F a c t o r v a l u e=” {{ o l d
o f s a f e t y ”> ( ’ deep fs ’)
FS</a></th> }} ” i d=”
<th><a data−t o g g l e d e e p f s {{
=” t o o l t i p ” $ b o r e h o l e −>
t i t l e =” ”>&r h o bh num }} ”
; </a></th> r e q u i r e d ></td
<th><a data−t o g g l e >
=” t o o l t i p ” <td><i n p u t t y p e=”
t i t l e =” ”>f y </ number ” name=
a></th> ” deep rho [ ] ”
<th><a data−t o g g l e c l a s s=” form−
=” t o o l t i p ” control
t i t l e =” ”>f c </ to clear ”
a></th> s t e p=” any ”
<th><a data−t o g g l e v a l u e=” {{ o l d
=” t o o l t i p ” ( ’ deep rho ’)
t i t l e =” ”> }} ” i d=”
Concrete d e e p r h o {{
S t r e n g t h ( kN ) $ b o r e h o l e −>
</a></th> bh num }} ”
<th><a data−t o g g l e r e q u i r e d ></td
124
> sub>t i p </sub
<td><i n p u t t y p e=” ></a></th>
number ” name= <th><a data−t o g g l e
” deep fy [ ] ” =” t o o l t i p ”
c l a s s=” form− t i t l e =” ”>Q<
control sub>t o t a l </
to clear ” sub></a></th>
s t e p=” any ” <th><a data−t o g g l e
v a l u e=” {{ o l d =” t o o l t i p ”
( ’ deep fy ’) t i t l e =” ”>Q (
}} ” i d=” kN )</a></th>
d e e p f y {{ <th><a data−t o g g l e
$ b o r e h o l e −> =” t o o l t i p ”
bh num }} ” t i t l e =” ”>Q (
r e q u i r e d ></td t o n )</a></th>
> <th><a data−t o g g l e
<td><i n p u t t y p e=” =” t o o l t i p ”
number ” name= t i t l e =” ”>
” deep fc [ ] ” Choose </a></
c l a s s=” form− th>
control </t r >
to clear ” </thead>
s t e p=” any ” <tbody>
v a l u e=” {{ o l d @foreach ( $samples as
( ’ deep fc ’) $sample )
}} ” i d=” @ i f ( $sample−>b h i d ==
d e e p f c {{ $ b o r e h o l e −>i d )
$ b o r e h o l e −> { ! ! Form : : h i d d e n ( ’
bh num }} ” sample id [ ] ’ ,
r e q u i r e d ></td $sample−>i d ) ! ! }
> <?php ( s i z e o f (
<td><i n p u t t y p e=” $shallows ) > 0) ?
number ” name= $q = $ s h a l l o w s [
” $ i ]−> s h a l l o w q :
deep concrete strength kn $q = ” ” ?>
[ ] ” c l a s s=” <t r >
form−c o n t r o l <td><i n p u t t y p e=”
to clear number ” name=
deep concrete strength kn ” deep depth [ ]
{{ $ b o r e h o l e ” c l a s s=” form
−>bh num }} ” −c o n t r o l
s t e p=” any ” i d d e e p d e p t h {{
=” $ b o r e h o l e −>
deep concrete strength kn bh num }} ”
{{ $ b o r e h o l e s t e p=” any ”
−>bh num }} ” v a l u e=” {{
readonly $sample−>
r e q u i r e d ></td s a m p l e t o }} ”
> i d=”
<td><i n p u t t y p e=” d e e p d e p t h {{
number ” name= $ b o r e h o l e −>
” bh num }} {{
deep concrete strength ton $sample−>
[ ] ” c l a s s=” sample num }}
form−c o n t r o l ” r e a d o n l y ></
to clear td>
deep concrete strength ton <td><i n p u t t y p e=”
{{ $ b o r e h o l e number ” name=
−>bh num }} ” ” deep f [ ] ”
s t e p=” any ” i d c l a s s=” form−
=” control
deep concrete strength ton to clear
{{ $ b o r e h o l e d e e p f {{
−>bh num }} ” $ b o r e h o l e −>
readonly bh num }} ”
r e q u i r e d ></td s t e p=” any ” i d
> =” d e e p f {{
</t r > $ b o r e h o l e −>
</tbody> bh num }} {{
</ t a b l e > $sample−>
<t a b l e c l a s s=” t a b l e t a b l e − sample num }}
s t r i p e d t a b l e −h o v e r ”> ” readonly
<thead> r e q u i r e d ></td
<t r > >
<th><a data−t o g g l e <td><i n p u t t y p e=”
=” t o o l t i p ” number ” name=
t i t l e =” Depth ”
of footing deep Asurface
below l o w e s t [ ] ” c l a s s=”
adjacent s o i l form−c o n t r o l
s u r f a c e ”>D< to clear
sub>f </sub></ deep Asurface
a></th> {{ $ b o r e h o l e
<th><a data−t o g g l e −>bh num }} ”
=” t o o l t i p ” s t e p=” any ” i d
t i t l e =” ”>f </a =”
></th> deep Asurface
<th><a data−t o g g l e {{ $ b o r e h o l e
=” t o o l t i p ” −>bh num }}
t i t l e =” ”>A< {{ $sample−>
sub>s u r f a c e </ sample num }}
sub></a></th> ” readonly
<th><a data−t o g g l e r e q u i r e d ></td
=” t o o l t i p ” >
t i t l e =” ”>q</a <td><i n p u t t y p e=”
></th> number ” name=
<th><a data−t o g g l e ” deep q [ ] ”
=” t o o l t i p ” c l a s s=” form−
t i t l e =” ”>A< control
125
d e e p q {{ @endforeach
$ b o r e h o l e −> </tbody>
bh num }} ” </ t a b l e >
s t e p=” any ” <b r/>
v a l u e=” {{ $q @endforeach
}} ” i d=” <d i v c l a s s=” l n s o l i d ”></d i v>
d e e p q {{ { ! ! Form : : h i d d e n ( ’ p r o j i d ’ ,
$ b o r e h o l e −> $ p r o j e c t −>i d ) ! ! }
bh num }} {{ { ! ! Form : : h i d d e n ( ’
$sample−> d e e p i s c h o s e n [ ] ’ , −1)
sample num }} !!}
” readonly { ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’
r e q u i r e d ></td Back ’ , array ( ’ c l a s s ’ => ’
> btn btn−d e f a u l t ’ ) ) ! ! }
<td><i n p u t t y p e=” { ! ! Form : : b u t t o n ( ’ C l e a r ’ , [ ’
number ” name= c l a s s ’ => ’ btn btn−d a n g e r
” deep Atip [ ] ” ’ , ’ o n c l i c k ’ => ’
c l a s s=” form− clearForm ( ) ’ ] ) ! ! }
control { ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’
to clear c l a s s ’ => ’ btn btn−
d e e p A t i p {{ p r i m a r y ’ , ’ s t y l e ’ => ’
$ b o r e h o l e −> float : right ’ , ’ onclick ’
bh num }} ” => ’ c a l c u l a t e ( ) ’ ] ) ! ! }
s t e p=” any ” i d { ! ! Form : : b u t t o n ( ’ C a l c u l a t e ’ ,
=” d e e p A t i p [ ’ c l a s s ’ => ’ btn btn−
{{ $ b o r e h o l e s u c c e s s ’ , ’ s t y l e ’ => ’
−>bh num }} float : right ’ , ’ onclick ’
{{ $sample−> => ’ c a l c u l a t e ( ) ’ ] ) ! ! }
sample num }} { ! ! Form : : c l o s e ( ) ! ! }
” readonly @endif
r e q u i r e d ></td </d i v>
> </d i v>
<td><i n p u t t y p e=” </d i v>
number ” name= </d i v>
” deep Qtotal @endsection
[ ] ” c l a s s=” @section ( ’ j s ’ )
form−c o n t r o l @parent
to clear @include ( ’ deeps / c a l c u l a t e ’ )
deep Qtotal @endsection
{{ $ b o r e h o l e
−>bh num }} ”
s t e p=” any ” i d
=”
deep Qtotal
Listing 75: deeps/edit.blade.php
{{ $ b o r e h o l e @extends ( ’ l a y o u t s / m a s t e r ’ )
−>bh num }} @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
{{ $sample−> @section ( ’ content ’ )
sample num }} <d i v c l a s s=” row ”>
” readonly <d i v c l a s s=” c o l −md−12”>
r e q u i r e d ></td <d i v c l a s s=” x p a n e l ”>
> <d i v c l a s s=” x t i t l e ”>
<td><i n p u t t y p e=” <h2>E d i t − Deep F o u n d a t i o n <
number ” name= s m a l l >Compute s o i l
” deep Q kn [ ] ” b e a r i n g c a p a c i t y f o r deep
c l a s s=” form− f o u n d a t i o n </s m a l l ></h2>
control <u l c l a s s=” nav navbar−r i g h t
to clear p a n e l t o o l b o x ”>
d e e p Q k n {{ < l i ><a c l a s s=” c o l l a p s e −
$ b o r e h o l e −> l i n k ”><i c l a s s=” f a f a
bh num }} ” −c h e v r o n−up”></i ></a>
s t e p=” any ” i d </ l i >
=” d e e p Q k n < l i c l a s s=” dropdown ”>
{{ $ b o r e h o l e <a h r e f=”#” c l a s s=”
−>bh num }} dropdown−t o g g l e ”
{{ $sample−> data−t o g g l e=”
sample num }} dropdown ” r o l e=”
” readonly button ” aria −
r e q u i r e d ></td expanded=” f a l s e ”
> ><i c l a s s=” f a f a −
<td><i n p u t t y p e=” wrench ”></i ></a>
number ” name= <u l c l a s s=” dropdown−
” deep Q ton [ ] menu” r o l e=”menu”
” c l a s s=” form >
−c o n t r o l < l i ><a h r e f=”#”>
to clear S e t t i n g s 1</a
d e e p Q t o n {{ >
$ b o r e h o l e −> </ l i >
bh num }} ” < l i ><a h r e f=”#”>
s t e p=” any ” i d S e t t i n g s 2</a
=” d e e p Q t o n >
{{ $ b o r e h o l e </ l i >
−>bh num }} </u l >
{{ $sample−> </ l i >
sample num }} </u l >
” readonly <d i v c l a s s=” c l e a r f i x ”></d i v>
r e q u i r e d ></td </d i v>
> <d i v c l a s s=” x c o n t e n t ”>
<t d s t y l e=” t e x t − @if ( sizeof ( $deeps ) > 0)
align : center ; <?php $ s o i l = [ ” c l a y ” , ” s i l t ” ]
”><i n p u t t y p e ?>
=” c h e c k b o x ” { ! ! Form : : open ( [ ’ name ’ => ’
name=” u p d a t e f o r m ’ , ’ method ’ =>
deep is chosen ’PUT ’ , ’ r o u t e ’ => [ ’
[ ] ” v a l u e=” {{ d e e p s . u p d a t e ’ , $ p r o j e c t −>
$sample−>i d i d ] , ’ c l a s s ’ => ’ form−
}} ”></td> h o r i z o n t a l form−l a b e l −
</t r > l e f t ’ , ’ i d ’ => ’
<?php $ i++ ?> update form ’ ] ) ! ! }
@endif @foreach ( $ b o r e h o l e s as
126
$borehole ) −>bh num
<c e n t e r > }} ”
<h2>B o r e h o l e {{ $ b o r e h o l e required>
−>bh num }} <s m a l l >( </td>
ID#{{ $ b o r e h o l e −>i d <td>
} } )</ s m a l l ></h2> <?php $deep K
</ c e n t e r > = Helper
<t a b l e c l a s s=” t a b l e t a b l e − ::
s t r i p e d t a b l e −h o v e r ”> getValue (
<thead> old ( ’
<t r > deep K ’ ) ,
<th><a data−t o g g l e $deeps [
=” t o o l t i p ” $ i ]−>
t i t l e =” ”>P i l e deep K )
S i z e </a></th ?>
> <i n p u t t y p e=”
<th><a data−t o g g l e number ”
=” t o o l t i p ” name=”
t i t l e =” ”>K</a deep K [ ] ”
></th> c l a s s=”
<th><a data−t o g g l e form−
=” t o o l t i p ” control
t i t l e =” ”>& to clear ”
gamma; </a></ s t e p=”
th> any ”
<th><a data−t o g g l e v a l u e=” {{
=” t o o l t i p ” ( float )
t i t l e =” ”>tan& $deep K
d e l t a ; </a></ }} ” i d=”
th> d e e p K {{
<th><a data−t o g g l e
=” t o o l t i p ” $borehole
t i t l e =” F a c t o r −>bh num
o f s a f e t y ”> }} ”
FS</a></th> required>
<th><a data−t o g g l e </td>
=” t o o l t i p ” <td>
t i t l e =” ”>&r h o <?php
; </a></th> $deep gamma
<th><a data−t o g g l e = Helper
=” t o o l t i p ” ::
t i t l e =” ”>f y </ getValue (
a></th> old ( ’
<th><a data−t o g g l e deep gamma
=” t o o l t i p ” ’) ,
t i t l e =” ”>f c </ $deeps [ $ i
a></th> ]−>
<th><a data−t o g g l e deep gamma
=” t o o l t i p ” ) ?>
t i t l e =” ”> <i n p u t t y p e=”
Concrete number ”
S t r e n g t h ( kN ) name=”
</a></th> deep gamma
<th><a data−t o g g l e [] ” class
=” t o o l t i p ” =” form−
t i t l e =” ”> control
Concrete to clear ”
Strength ( ton s t e p=”
)</a></th> any ”
</t r > v a l u e=” {{
</thead> ( float )
<tbody> $deep gamma
<?php $ i = 0 ?> }} ” i d=”
@while ( $ b o r e h o l e −>i d deep gamma
!= $ d e e p s [ $ i ]−> {{
bh id ) $borehole
<?php $ i++ ?> −>bh num
@endwhile }} ”
<t r > required>
<td> </td>
<?php <td>
$deep pile size <?php
= Helper $deep tan
:: = Helper
getValue ( ::
old ( ’ getValue (
deep pile size old ( ’
’) , deep tan ’
$deeps [ $ i ) , $deeps
]−> [ $ i ]−>
deep pile size deep tan )
) ?> ?>
<i n p u t t y p e=” <i n p u t t y p e=”
number ” number ”
name=” name=”
deep pile size deep tan
[] ” class [] ” class
=” form− =” form−
control control
to clear ” to clear ”
s t e p=” s t e p=”
any ” any ”
v a l u e=” {{ v a l u e=” {{
( float ) ( float )
$deep pile size $deep tan
}} ” i d=” }} ” i d=”
deep pile size deep tan
{{ {{
$borehole $borehole
127
−>bh num required>
}} ” </td>
required> <td>
</td> <?php $ d e e p f c
<td> = Helper
<?php $ d e e p f s ::
= Helper getValue (
:: old ( ’
getValue ( deep fc ’ )
old ( ’ , $deeps [
deep fs ’ ) $ i ]−>
, $deeps [ deep fc )
$ i ]−> ?>
deep fs ) <i n p u t t y p e=”
?> number ”
<i n p u t t y p e=” name=”
number ” deep fc [ ]
name=” ” c l a s s=”
deep fs [ ] form−
” c l a s s=” control
form− to clear ”
control s t e p=”
to clear ” any ”
s t e p=” v a l u e=” {{
any ” ( float )
v a l u e=” {{ $deep fc
( float ) }} ” i d=”
$deep fs deep fc
}} ” i d=” {{
deep fs $borehole
{{ −>bh num
$borehole }} ”
−>bh num required>
}} ” </td>
required> <td><i n p u t t y p e=”
</td> number ” name=
<td> ”
<?php deep concrete strength kn
$deep rho [ ] ” c l a s s=”
= Helper form−c o n t r o l
:: to clear
getValue ( deep concrete strength kn
old ( ’ {{ $ b o r e h o l e
deep rho ’ −>bh num }} ”
) , $deeps s t e p=” any ”
[ $ i ]−> v a l u e=” {{ (
deep rho ) f l o a t ) $deeps [
?> $ i ]−>
<i n p u t t y p e=” deep concrete strength kn
number ” }} ” i d=”
name=” deep concrete strength kn
deep rho {{ $ b o r e h o l e
[] ” class −>bh num }} ”
=” form− readonly
control r e q u i r e d ></td
to clear ” >
s t e p=” <td><i n p u t t y p e=”
any ” number ” name=
v a l u e=” {{ ”
( float ) deep concrete strength ton
$deep rho [ ] ” c l a s s=”
}} ” i d=” form−c o n t r o l
deep rho to clear
{{ deep concrete strength ton
$borehole {{ $ b o r e h o l e
−>bh num −>bh num }} ”
}} ” s t e p=” any ”
required> v a l u e=” {{ (
</td> f l o a t ) $deeps [
<td> $ i ]−>
<?php $ d e e p f y deep concrete strength ton
= Helper }} ” i d=”
:: deep concrete strength ton
getValue ( {{ $ b o r e h o l e
old ( ’ −>bh num }} ”
deep fy ’ ) readonly
, $deeps [ r e q u i r e d ></td
$ i ]−> >
deep fy ) </t r >
?> </tbody>
<i n p u t t y p e=” </ t a b l e >
number ” <t a b l e c l a s s=” t a b l e t a b l e −
name=” s t r i p e d t a b l e −h o v e r ”>
deep fy [ ] <thead>
” c l a s s=” <t r >
form− <th><a data−t o g g l e
control =” t o o l t i p ”
to clear ” t i t l e =” Depth
s t e p=” of footing
any ” below l o w e s t
v a l u e=” {{ adjacent s o i l
( float ) s u r f a c e ”>D<
$deep fy sub>f </sub></
}} ” i d=” a></th>
deep fy <th><a data−t o g g l e
{{ =” t o o l t i p ”
$borehole t i t l e =” ”>f </a
−>bh num ></th>
}} ” <th><a data−t o g g l e
128
=” t o o l t i p ” to clear
t i t l e =” ”>A< deep Asurface
sub>s u r f a c e </ {{ $ b o r e h o l e
sub></a></th> −>bh num }} ”
<th><a data−t o g g l e s t e p=” any ”
=” t o o l t i p ” v a l u e=” {{ (
t i t l e =” ”>q</a f l o a t ) $deep−>
></th> deep Asurface
<th><a data−t o g g l e }} ” i d=”
=” t o o l t i p ” deep Asurface
t i t l e =” ”>A< {{ $ b o r e h o l e
sub>t i p </sub −>bh num }}
></a></th> {{ $k }} ”
<th><a data−t o g g l e readonly
=” t o o l t i p ” r e q u i r e d ></td
t i t l e =” ”>Q< >
sub>t o t a l </ <td><i n p u t t y p e=”
sub></a></th> number ” name=
<th><a data−t o g g l e ” deep q [ ] ”
=” t o o l t i p ” c l a s s=” form−
t i t l e =” ”>Q ( control
kN )</a></th> d e e p q {{
<th><a data−t o g g l e $ b o r e h o l e −>
=” t o o l t i p ” bh num }} ”
t i t l e =” ”>Q ( s t e p=” any ”
t o n )</a></th> v a l u e=” {{ $q
<th><a data−t o g g l e }} ” i d=”
=” t o o l t i p ” d e e p q {{
t i t l e =” ”> $ b o r e h o l e −>
Choose </a></ bh num }} {{
th> $k }} ”
</t r > readonly
</thead> r e q u i r e d ></td
<tbody> >
<?php $ j = 0 ; $k = 1 ; <td><i n p u t t y p e=”
?> number ” name=
@foreach ( $deeps as ” deep Atip [ ] ”
$deep ) c l a s s=” form−
@ i f ( $deep−>b h i d === control
$ b o r e h o l e −>i d ) to clear
{ ! ! Form : : h i d d e n ( ’ d e e p A t i p {{
sample id [ ] ’ , $ b o r e h o l e −>
$deep−>s a m p l e i d ) bh num }} ”
!!} s t e p=” any ”
{ ! ! Form : : h i d d e n ( ’ v a l u e=” {{ (
d e e p i d [ ] ’ , $deep f l o a t ) $deep−>
−>i d ) ! ! } d e e p A t i p }} ”
<?php ( s i z e o f ( i d=”
$shallows ) > 0) ? d e e p A t i p {{
$q = $ s h a l l o w s [ $ b o r e h o l e −>
$ j ]−> s h a l l o w q : bh num }} {{
$q = ” ” ?> $k }} ”
<t r > readonly
<td><i n p u t t y p e=” r e q u i r e d ></td
number ” name= >
” deep depth [ ] <td><i n p u t t y p e=”
” c l a s s=” form number ” name=
−c o n t r o l ” deep Qtotal
d e e p d e p t h {{ [ ] ” c l a s s=”
$ b o r e h o l e −> form−c o n t r o l
bh num }} ” to clear
s t e p=” any ” deep Qtotal
v a l u e=” {{ ( {{ $ b o r e h o l e
float ) −>bh num }} ”
$samples [ $ j s t e p=” any ”
]−> s a m p l e t o v a l u e=” {{ (
}} ” i d=” f l o a t ) $deep−>
d e e p d e p t h {{ deep Qtotal
$ b o r e h o l e −> }} ” i d=”
bh num }} {{ deep Qtotal
$k }} ” {{ $ b o r e h o l e
r e a d o n l y ></td −>bh num }}
> {{ $k }} ”
<td><i n p u t t y p e=” readonly
number ” name= r e q u i r e d ></td
” deep f [ ] ” >
c l a s s=” form− <td><i n p u t t y p e=”
control number ” name=
to clear ” deep Q kn [ ] ”
d e e p f {{ c l a s s=” form−
$ b o r e h o l e −> control
bh num }} ” to clear
s t e p=” any ” d e e p Q k n {{
v a l u e=” {{ ( $ b o r e h o l e −>
f l o a t ) $deep−> bh num }} ”
d e e p f }} ” s t e p=” any ”
i d=” d e e p f {{ v a l u e=” {{ (
$ b o r e h o l e −> f l o a t ) $deep−>
bh num }} {{ d e e p Q k n }} ”
$k }} ” i d=”
readonly d e e p Q k n {{
r e q u i r e d ></td $ b o r e h o l e −>
> bh num }} {{
<td><i n p u t t y p e=” $k }} ”
number ” name= readonly
” r e q u i r e d ></td
deep Asurface >
[ ] ” c l a s s=” <td><i n p u t t y p e=”
form−c o n t r o l number ” name=
129
” deep Q ton [ ] Listing 76: deeps/index.blade.php
” c l a s s=” form
−c o n t r o l @extends ( ’ l a y o u t s / m a s t e r ’ )
to clear @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
d e e p Q t o n {{ @section ( ’ content ’ )
$ b o r e h o l e −> <d i v c l a s s=” row ”>
bh num }} ” <d i v c l a s s=” c o l −md−12”
s t e p=” any ” >
v a l u e=” {{ ( <d i v c l a s s=”
f l o a t ) $deep−> x p a n e l ”>
d e e p Q t o n }} <d i v c l a s s=”
” i d=” x t i t l e ”>
d e e p Q t o n {{ <h2>Deep
$ b o r e h o l e −> Foundation
bh num }} {{ <
$k }} ” small
readonly >
r e q u i r e d ></td Compute
> soil
<t d s t y l e=” t e x t −
align : center ; bearing
”>
<?php ( $deep−> capacity
deep is chosen for
== 1 ) ? deep
$checked foundation
= ” </
checked ” s mall
: ></h2
$checked >
= ”” ?> <u l c l a s s=
<i n p u t t y p e=” ” nav
checkbox ” navbar
name=” −
deep is chosen right
[ ] ” value
=” {{ panel toolbox
$deep−> ”>
sample id < l i ><a
}} ”
s t y l e=” class
text− =
align : ”
center ” collapse
{{ −
$checked link
}}> ”
</td> ><
</t r > i
<?php $k++ ?>
@endif class
<?php $ j++ ?> =
@endforeach ”
</tbody> fa
</ t a b l e >
<b r/> fa
{ ! ! Form : : h i d d e n ( ’ b h i d [ ] ’ , −
$ b o r e h o l e −>i d ) ! ! } chevron
{ ! ! Form : : h i d d e n ( ’ −
n u m o f s a m p l e s [ ] ’ , $k −1) up
!!} ”
@endforeach ></
<d i v c l a s s=” l n s o l i d ”></d i v> i
{ ! ! Form : : h i d d e n ( ’ p r o j i d ’ , ></
$ p r o j e c t −>i d ) ! ! } a
{ ! ! Form : : h i d d e n ( ’ >
d e e p i s c h o s e n [ ] ’ , −1) </ l i >
!!} <l i
{ ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ class
Back ’ , array ( ’ c l a s s ’ => ’ =
btn btn−d e f a u l t ’ ) ) ! ! } ”
{ ! ! Form : : b u t t o n ( ’ C l e a r ’ , [ ’ dropdown
c l a s s ’ => ’ btn btn−d a n g e r ”
’ , ’ o n c l i c k ’ => ’ >
clearForm ( ) ’ ] ) ! ! } <a
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’
c l a s s ’ => ’ btn btn− href
p r i m a r y ’ , ’ s t y l e ’ => ’ =
float : right ’ , ’ onclick ’ ”
=> ’ c a l c u l a t e ( ) ’ ] ) ! ! } #
{ ! ! Form : : b u t t o n ( ’ C a l c u l a t e ’ , ”
[ ’ c l a s s ’ => ’ btn btn−
s u c c e s s ’ , ’ s t y l e ’ => ’ class
float : right ’ , ’ onclick ’ =
=> ’ c a l c u l a t e ( ) ’ ] ) ! ! } ”
{ ! ! Form : : c l o s e ( ) ! ! } dropdown
@endif −
</d i v> toggle
</d i v> ”
</d i v>
</d i v> data
@endsection −
@section ( ’ j s ’ ) toggle
@parent =
@include ( ’ deeps / c a l c u l a t e ’ ) ”
@endsection dropdown
”
role
130
= ”></
” d i v>
button </d i v>
”
<d i v c l a s s=”
aria x content
− ”>
expanded @if ( sizeof
= (
” $deeps
false ) >
” 0)
>< @foreach
i (
$boreholes
class
= as
”
fa $borehole
)
fa <
− center
wrench ><
” h2
></ >
i Borehole
></
a {{
>
$borehole
< −>
ul bh num
class }}
=
” <
dropdown small
− >(
menu ID
” #
{{
role
= $borehole
” −>
menu id
”
> }})
</
< small
li ></
>< h2
a ></
center
href >
=
” <
# table
”
> class
Settings =
”
1</ table
a
> table
−
</ hover
li
> table
−
< bordered
li ”
>< >
a
<
href thead
= >
”
# <
” tr
> >
Settings
<
2</ th
a ><
> a
</ da
li −
> to
=
</ ”
ul to
> ”
</ l i > ti
</u l > =
<d i v c l a s s ”
=” ”
clearfix >
131
Pile ti
=
Size ”
</ Fa
a
></ of
th
> sa
”
< >
th FS
>< </
a a
><
data th
− >
toggle
= <
” th
tooltip ><
” a
title da
= −
” to
” =
> ”
K to
</ ”
a
></ ti
th =
> ”
”
< >&
th rho
>< ; </
a a
><
data th
− >
toggle
= <
” th
tooltip ><
” a
title da
= −
” to
” =
>& ”
gamma to
; </ ”
a
></ ti
th =
> ”
”
< >
th fy
>< </
a a
><
data th
− >
toggle
= <
” th
tooltip ><
” a
title da
= −
” to
” =
> ”
tan to
& ”
delta
; </ ti
a =
></ ”
th ”
> >
fc
< </
th a
>< ><
a th
>
data
− <
toggle th
= ><
” a
tooltip
” da
−
132
toggle ?>
=
” @endwhile
tooltip
” <
tr
title >
=
” <
” td
> >{
Concrete
(
Strength flo
)
( $d
kN [
) $i
</ ]−>
a de
></
th }}<
> td
>
<
th <
>< td
a >{
data (
− flo
toggle )
= $d
” [
tooltip $i
” ]−>
dee
title
= }}<
” td
” >
>
Concrete <
td
Strength >{
( (
ton flo
) )
</ $d
a [
></ $i
th ]−>
> dee
</ }}<
tr td
> >
</ <
thead td
> >{
< (
tbody flo
> )
$d
<? [
php $i
]−>
$i de
= }}<
td
0 >
?> <
td
@while >{
(
$borehole (
−> flo
id )
$d
!= [
$i
$deeps ]−>
[ de
$i
]−> }}<
bh id td
) >
<? <
php td
>{
$i
++ (
flo
133
)
$deeps table
[ −
$i hover
]−>
deep rho table
−
}}</ bordered
td ”
> >
< <
td thead
>{{ >
( <
float tr
) >
$deeps
[ <
$i th
]−> ><
deep fy a
}}</ da
td −
> to
=
< ”
td to
>{{ ”
( ti
float =
) ”
$deeps De
[
$i of
]−>
deep fc foo
}}</ bel
td
> low
< ad
td
>{{ so
( su
float ”
) >
$deeps D
[ <
$i sub
]−> >
deep concrete strength kn f
</
}}</ sub
td ><
> a
><
< th
td >
>{{
<
( th
float ><
) a
$deeps
[ da
$i −
]−> to
deep concrete strength ton =
”
}}</ to
td ”
>
ti
</ =
tr ”
> ”
>
</ f
tbody </
> a
><
</ th
table >
>
<
th
< ><
table a
class da
= −
” to
table =
134
” >
tooltip to
” </
sub
title ><
= a
” ><
” th
> >
A
< <
sub th
> ><
surface a
</
sub da
></ −
a to
></ =
th ”
> to
”
<
th ti
>< =
a ”
”
data >
− Q
toggle
= (
” kN
tooltip )
” </
a
title ><
= th
” >
”
> <
q th
</ ><
a a
></
th da
> −
to
< =
th ”
>< to
a ”
data ti
− =
toggle ”
= ”
” >
tooltip Q
”
(
title ton
= )
” </
” a
> ><
A th
< >
sub
> </
tip tr
</ >
sub
></ </
a thead
></ >
th
> <
tbody
< >
th
>< <?
a php
data $j
−
toggle =
=
” 0
tooltip
” ?>
title @foreach
= (
” $deeps
”
> as
Q
< $deep
sub )
135
@if
(
$deep
−>
bh id
===
$borehole
−>
id
)
<?
php
(
$deep
−>
deep is chosen
==
1)
$class
”
chosen
”
$class
”
”
?>
<
tr
class
=
”
{{
$class
}}
”
>
<
td
>{{
(
float
)
$samples
[
$j
]−>
sample to
}}</
td
>
<
td
>{{
(
float
) </
$deep
−>
deep f
@endif
}}</
td <?
> php
< $j
td ++
>{{
?>
(
float @endforeach
136
</ [
tbody ’
> class
’
</
table =>
>
’
< btn
br
/> btn
−
@endforeach danger
’
])
<d i v
class !!}
=
” <a
ln solid href
” =
></ ”
div {{
>
{!! route
Form (’
:: deeps
open .
([ edit
’ ’,
method
’ $project
−>
=> id
)
’
DELETE }}
’ ”
,
class
’ =
route ”
’ btn
=> btn
−
[ info
’ ”
deeps
. style
destroy =
’ ”
, float
:
$project right
−> ”
id ><
], i
’ class
o ns u b mi t =
’ ”
fa
=>
fa
’ −
return edit
confirm m
(” −
Delete right
−
SBC xs
”
data ></
i
for >
deep Edit
foundation </
a
permanently >
?”) {!!
’ Form
]) ::
close
!!} ()
{!! !!}
Form
:: @endif
submit </d i v>
( </d i v>
’ </d i v>
Delete </d i v>
’
, @endsection
137
Listing 77: drilledshafts/calcu- // Compute Q f r i c t i o n
d f = $ ( ’#d s d e p t h ’ + i +
late.blade.php ’ ’ + j ) . val () ;
@include ( ’ i n c l u d e s / clearform ’ ) q f r i c t i o n = Math . PI ∗ f ∗
p i l e s i z e ∗ df ;
<!−− t o o l t i p −−> $ ( ’#d s Q f r i c t i o n ’ + i + ’
<s c r i p t > ’ + j ) . val (
$ ( document ) . r e a d y ( f u n c t i o n ( ) { parseFloat ( q f r i c t i o n .
$ ( ’ [ data−t o g g l e =” t o o l t i p ” ] ’ ) . t o o l t i p ( ) toFixed (4) ) ) ;
;
}) ; // Compute Q t o t a l ( kN )
</ s c r i p t > f s = $ ( ’#d s f s ’ + i ) . v a l
<!−− / t o o l t i p −−> () ;
<!−− c a l c u l a t e −−> q t o t a l k n = ( q b a s e+
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”> qfriction )/ fs ;
v a r n u m o f b o r e h o l e s = <?php echo $ ( ’#d s Q t o t a l k n ’ + i + ’
s i z e o f ( $ b o r e h o l e s ) ? >; ’ + j ) . val (
var num of samples ; parseFloat ( qtotal kn .
var fy , s b d i a m e t e r ; toFixed (4) ) ) ;
var s o i l t y p e , num of blows ,
c denominator , c ; // Compute Q t o t a l ( t o n )
v a r nc , p i l e s i z e , q b a s e ; qtotal ton = qtotal kn
var f c o e f f , f ; ∗0.10219;
var df , q f r i c t i o n ; $ ( ’#d s Q t o t a l t o n ’ + i +
var fs , q t o t a l k n , q t o t a l t o n ; ’ ’ + j ) . val (
var fc , cs kn , c s t o n ; parseFloat ( qtotal ton
. toFixed (4) ) ) ;
function calculate () {
f o r ( i = 1 ; i <= n u m o f b o r e h o l e s ; // Compute c o n c r e t e
i ++) { s t r e n g t h ( kN )
// Compute t e n s i o n c a p a c i t y f c = $ ( ’#d s f c ’ + i ) . v a l
f y = $ ( ’#d s f y ’ + i ) . v a l ( ) ; () ;
s b d i a m e t e r = $ ( ’# c s k n = ( 0 . 8 5 ∗ 0 . 7 ∗ ( Math . PI
ds steel bar diameter ’ + ∗pile size∗pile size
i ) . val () ; ∗ 1 0 0 0 ∗ 1 0 0 0 / 4 ) ∗ f c +(
Math . PI ∗ s b d i a m e t e r ∗
tension cap = (3.1416∗ fy ∗(( s b d i a m e t e r /4∗ f y ) )
sb diameter ∗ sb diameter ) /1000;
/4) ) /1000; $ ( ’#
$ ( ’#d s t e n s i o n c a p ’ + i ) . v a l ( ds concrete strength kn
parseFloat ( tension cap . ’ + i ) . val ( parseFloat
toFixed (4) ) ) ; ( cs kn . toFixed (4) ) ) ;
num of samples = $ ( ’ . ds depth // Compute c o n c r e t e
’ + i ) . length ; s t r e n g t h ( ton )
f o r ( j = 1 ; j <= n u m o f s a m p l e s cs ton = cs kn ∗0.10219;
; j ++) { $ ( ’#
ds concrete strength ton
// Compute c ’ + i ) . val ( parseFloat
s o i l t y p e = $ ( ’#d s s o i l ’ ( cs ton . toFixed (4) ) ) ;
+ i + ’ ’ + j + ’
option : s e l e c t e d ’ ) . }
text () ; }
n u m o f b l o w s = $ ( ’# }
ds num of blows ’ + i </ s c r i p t >
+ ’ ’ + j ) . val () ; <!−− / c a l c u l a t e −−>
switch ( s o i l t y p e ) {
case ’ c l a y ’ :
c denominator =
4 ; break ; Listing 78: drilledshafts/cre-
case ’ s i l t ’ :
c denominator = ate.blade.php
5 ; break ;
default : c denominator @extends ( ’ l a y o u t s / m a s t e r ’ )
= n u l l ; break ; @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
} @section ( ’ content ’ )
<d i v c l a s s=” row ”>
c = ( num of blows ∗48) / <d i v c l a s s=” c o l −md−12”>
c denominator ; <d i v c l a s s=” x p a n e l ”>
$ ( ’#d s c ’ + i + ’ ’ + j ) . <d i v c l a s s=” x t i t l e ”>
val ( parseFloat ( c . <h2>C r e a t e − D r i l l e d S h a f t
toFixed (4) ) ) ; F o u n d a t i o n <s m a l l >Compute
s o i l bearing capacity
// Compute Qbase for d r i l l e d s h a f t
nc = $ ( ’#d s N c ’ + i ) . v a l f o u n d a t i o n </s m a l l ></h2>
() ; <u l c l a s s=” nav navbar−r i g h t
p i l e s i z e = $ ( ’# p a n e l t o o l b o x ”>
ds pile size ’ + i ) . < l i ><a c l a s s=” c o l l a p s e −
val () ; l i n k ”><i c l a s s=” f a f a
−c h e v r o n−up”></i ></a>
q b a s e = c ∗ nc ∗ ( Math . PI ∗ ( ( </ l i >
pile size∗pile size ) < l i c l a s s=” dropdown ”>
/4) ) ; <a h r e f=”#” c l a s s=”
$ ( ’#d s Q b a s e ’ + i + ’ ’ + dropdown−t o g g l e ”
j ) . val ( parseFloat ( data−t o g g l e=”
qbase . toFixed ( 4 ) ) ) ; dropdown ” r o l e=”
button ” aria −
// Compute f expanded=” f a l s e ”
f c o e f f = $ ( ’#d s f c o e f f ’ ><i c l a s s=” f a f a −
+ i ) . val () ; wrench ”></i ></a>
<u l c l a s s=” dropdown−
f = c∗ f c o e f f ; menu” r o l e=”menu”
$ ( ’#d s f ’ + i + ’ ’ + j ) . >
val ( parseFloat ( f . < l i ><a h r e f=”#”>
toFixed (4) ) ) ; S e t t i n g s 1</a
>
</ l i >
138
< l i ><a h r e f=”#”> </t r >
S e t t i n g s 2</a </thead>
> <tbody>
</ l i > <t r >
</u l > <td><i n p u t t y p e=”
</ l i > number ” name=
</u l > ”ds pile size
<d i v c l a s s=” c l e a r f i x ”></d i v> [ ] ” c l a s s=”
</d i v> form−c o n t r o l
<d i v c l a s s=” x c o n t e n t ”> to clear ”
@if ( sizeof ( $samples ) > 0) s t e p=” any ”
<?php $ s o i l = [ ” c l a y ” , ” s i l t ” ] v a l u e=” {{ o l d
?> (’
{ ! ! Form : : open ( [ ’ name ’ => ’ ds pile size
s t o r e f o r m ’ , ’ method ’ => ’ ) }} ” i d=”
’POST ’ , ’ r o u t e ’ => ’ ds pile size
drilledshafts . store ’ , ’ {{ $ b o r e h o l e
c l a s s ’ => ’ form− −>bh num }} ”
h o r i z o n t a l form−l a b e l − r e q u i r e d ></td
left ’ ]) !!} >
@foreach ( $ b o r e h o l e s as <td><i n p u t t y p e=”
$borehole ) number ” name=
{ ! ! Form : : h i d d e n ( ’ b h i d [ ] ’ , ” ds Nc [ ] ”
$ b o r e h o l e −>i d ) ! ! } c l a s s=” form−
{ ! ! Form : : h i d d e n ( ’ control
num of samples [ ] ’ , to clear ”
$ b o r e h o l e −> s t e p=” any ”
bh num of samples ) ! ! } v a l u e=” {{ o l d
<c e n t e r > ( ’ d s N c ’ ) }} ”
<h2>B o r e h o l e {{ $ b o r e h o l e i d=” d s N c {{
−>bh num }} <s m a l l >( $ b o r e h o l e −>
ID#{{ $ b o r e h o l e −>i d bh num }} ”
} } )</ s m a l l ></h2> r e q u i r e d ></td
</ c e n t e r > >
<t a b l e c l a s s=” t a b l e t a b l e − <td><i n p u t t y p e=”
s t r i p e d t a b l e −h o v e r ”> number ” name=
<thead> ”ds f coeff []
<t r > ” c l a s s=” form
<th><a data−t o g g l e −c o n t r o l
=” t o o l t i p ” to clear ”
t i t l e =” ”>P i l e s t e p=” any ”
S i z e </a></th v a l u e=” {{ o l d
> ( ’ ds f coeff
<th><a data−t o g g l e ’ ) }} ” i d=”
=” t o o l t i p ” d s f c o e f f {{
t i t l e =” ”>N< $ b o r e h o l e −>
sub>c</sub></ bh num }} ”
a></th> r e q u i r e d ></td
<th><a data−t o g g l e >
=” t o o l t i p ” <td><i n p u t t y p e=”
t i t l e =” ”>F number ” name=
C o e f f </a></th ” ds fc [ ] ”
> c l a s s=” form−
<th><a data−t o g g l e control
=” t o o l t i p ” to clear ”
t i t l e =” s t e p=” any ”
Compressive v a l u e=” {{ o l d
strenght of ( ’ d s f c ’ ) }} ”
c o n c r e t e ”>f c i d=” d s f c {{
</a></th> $ b o r e h o l e −>
<th><a data−t o g g l e bh num }} ”
=” t o o l t i p ” r e q u i r e d ></td
t i t l e =” Y i e l d >
strenght of <td><i n p u t t y p e=”
reinforcing number ” name=
b a r ”>f y </a></ ” ds fy [ ] ”
th> c l a s s=” form−
<th><a data−t o g g l e control
=” t o o l t i p ” to clear ”
t i t l e =” S t e e l s t e p=” any ”
bar diameter ” v a l u e=” {{ o l d
>SB Diameter ( ’ d s f y ’ ) }} ”
</a></th> i d=” d s f y {{
<th><a data−t o g g l e $ b o r e h o l e −>
=” t o o l t i p ” bh num }} ”
t i t l e =” F a c t o r r e q u i r e d ></td
o f s a f e t y ”> >
FS</a></th> <td><i n p u t t y p e=”
<th><a data−t o g g l e number ” name=
=” t o o l t i p ” ”
t i t l e =” ds steel bar diameter
Tension [ ] ” c l a s s=”
capacity of form−c o n t r o l
s t e e l ”> to clear ”
Tension s t e p=” any ”
C a p a c i t y </a v a l u e=” {{ o l d
></th> (’
<th><a data−t o g g l e ds steel bar diameter
=” t o o l t i p ” ’ ) }} ” i d=”
t i t l e =” ”> ds steel bar diameter
Concrete {{ $ b o r e h o l e
S t r e n g t h ( kN ) −>bh num }} ”
</a></th> r e q u i r e d ></td
<th><a data−t o g g l e >
=” t o o l t i p ” <td><i n p u t t y p e=”
t i t l e =” ”> number ” name=
Concrete ” ds fs [] ”
Strength ( ton c l a s s=” form−
)</a></th> control
139
to clear ” =” t o o l t i p ”
s t e p=” any ” t i t l e =” ”>Q<
v a l u e=” {{ o l d sub>f r i c t i o n
( ’ d s f s ’ ) }} ” </sub></a></
i d=” d s f s {{ th>
$ b o r e h o l e −> <th><a data−t o g g l e
bh num }} ” =” t o o l t i p ”
r e q u i r e d ></td t i t l e =” ”>Q<
> sub>t o t a l </
<td><i n p u t t y p e=” sub> ( kN )</a
number ” name= ></th>
” <th><a data−t o g g l e
ds tension cap =” t o o l t i p ”
[ ] ” c l a s s=” t i t l e =” ”>Q<
form−c o n t r o l sub>t o t a l </
to clear ” sub> ( t o n )</a
s t e p=” any ” ></th>
v a l u e=” {{ o l d <th><a data−t o g g l e
(’ =” t o o l t i p ”
ds tension cap t i t l e =” ”>
’ ) }} ” i d=” Choose </a></
ds tension cap th>
{{ $ b o r e h o l e </t r >
−>bh num }} ” </thead>
r e a d o n l y ></td <tbody>
> @foreach ( $samples as
<td><i n p u t t y p e=” $sample )
number ” name= @ i f ( $sample−>b h i d ==
” $ b o r e h o l e −>i d )
ds concrete strength kn { ! ! Form : : h i d d e n ( ’
[ ] ” c l a s s=” sample id [ ] ’ ,
form−c o n t r o l $sample−>i d ) ! ! }
to clear <t r >
ds concrete strength kn <td><i n p u t t y p e=”
{{ $ b o r e h o l e number ” name=
−>bh num }} ” ” ds depth [ ] ”
s t e p=” any ” i d c l a s s=” form−
=” control
ds concrete strength kn d s d e p t h {{
{{ $ b o r e h o l e $ b o r e h o l e −>
−>bh num }} ” bh num }} ”
readonly s t e p=” any ”
r e q u i r e d ></td v a l u e=” {{
> $sample−>
<td><i n p u t t y p e=” s a m p l e t o }} ”
number ” name= i d=”
” d s d e p t h {{
ds concrete strength ton $ b o r e h o l e −>
[ ] ” c l a s s=” bh num }} {{
form−c o n t r o l $sample−>
to clear sample num }}
ds concrete strength ton ” r e a d o n l y ></
{{ $ b o r e h o l e td>
−>bh num }} ” <td><i n p u t t y p e=”
s t e p=” any ” i d number ” name=
=” ”
ds concrete strength ton ds num of blows
{{ $ b o r e h o l e [ ] ” c l a s s=”
−>bh num }} ” form−c o n t r o l
readonly ds num of blows
r e q u i r e d ></td {{ $ b o r e h o l e
> −>bh num }} ”
</t r > s t e p=” any ”
</tbody> v a l u e=” {{
</ t a b l e > $sample−>
<t a b l e c l a s s=” t a b l e t a b l e − sample num of blows
s t r i p e d t a b l e −h o v e r ”> }} ” i d=”
<thead> ds num of blows
<t r > {{ $ b o r e h o l e
<th><a data−t o g g l e −>bh num }}
=” t o o l t i p ” {{ $sample−>
t i t l e =” Depth sample num }}
of footing ” r e a d o n l y ></
below l o w e s t td>
adjacent s o i l <td>
s u r f a c e ”>D< <?php
sub>f </sub></ $ds soil select id
a></th> = ’
<th><a data−t o g g l e ds soil ’
=” t o o l t i p ” .
t i t l e =”Number $borehole
o f b l o w s ”> −>bh num
SPT N−v a l u e </ . ’ ’ .
a></th> $sample−>
<th>S o i l Type</th> sample num
<th><a data−t o g g l e ?>
=” t o o l t i p ” { ! ! Form : :
t i t l e =” ”>c</a select ( ’
></th> ds soil []
<th><a data−t o g g l e ’ , $soil ,
=” t o o l t i p ” old ( ’
t i t l e =” ”>Q< ds soil []
sub>b a s e </sub ’ ) , array
></a></th> ( ’ class ’
<th><a data−t o g g l e => ’ btn
=” t o o l t i p ” btn−
t i t l e =” ”>f </a default
></th> ds soil
<th><a data−t o g g l e {{
140
$borehole {{ $ b o r e h o l e
−>bh num −>bh num }}
}} ’ , ’ {{ $sample−>
placeholder sample num }}
’ => ’ ” readonly
S o i l type r e q u i r e d ></td
... ’ , ’ >
required ’ <td><i n p u t t y p e=”
=> ’ t r u e number ” name=
’ , ’ id ’ ”
=> ds Qtotal ton
$ds soil select id [ ] ” c l a s s=”
)) !!} form−c o n t r o l
</td> to clear
<td><i n p u t t y p e=” ds Qtotal ton
number ” name= {{ $ b o r e h o l e
” ds c [ ] ” −>bh num }} ”
c l a s s=” form− s t e p=” any ” i d
control =”
to clear ds Qtotal ton
d s c {{ {{ $ b o r e h o l e
$ b o r e h o l e −> −>bh num }}
bh num }} ” {{ $sample−>
s t e p=” any ” i d sample num }}
=” d s c {{ ” readonly
$ b o r e h o l e −> r e q u i r e d ></td
bh num }} {{ >
$sample−> <t d s t y l e=” t e x t −
sample num }} align : center ;
” readonly ”><i n p u t t y p e
r e q u i r e d ></td =” c h e c k b o x ”
> name=”
<td><i n p u t t y p e=” ds is chosen
number ” name= [ ] ” v a l u e=” {{
” ds Qbase [ ] ” $sample−>i d
c l a s s=” form− }} ”></td>
control </t r >
to clear @endif
d s Q b a s e {{ @endforeach
$ b o r e h o l e −> </tbody>
bh num }} ” </ t a b l e >
s t e p=” any ” i d <b r/>
=” d s Q b a s e {{ @endforeach
$ b o r e h o l e −> <d i v c l a s s=” l n s o l i d ”></d i v>
bh num }} {{ { ! ! Form : : h i d d e n ( ’ p r o j i d ’ ,
$sample−> $ p r o j e c t −>i d ) ! ! }
sample num }} { ! ! Form : : h i d d e n ( ’ d s i s c h o s e n
” readonly [ ] ’ , −1) ! ! }
r e q u i r e d ></td { ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’
> Back ’ , array ( ’ c l a s s ’ => ’
<td><i n p u t t y p e=” btn btn−d e f a u l t ’ ) ) ! ! }
number ” name= { ! ! Form : : b u t t o n ( ’ C l e a r ’ , [ ’
” ds f [ ] ” c l a s s ’ => ’ btn btn−d a n g e r
c l a s s=” form− ’ , ’ o n c l i c k ’ => ’
control clearForm ( ) ’ ] ) ! ! }
to clear { ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’
d s f {{ c l a s s ’ => ’ btn btn−
$ b o r e h o l e −> p r i m a r y ’ , ’ s t y l e ’ => ’
bh num }} ” float : right ’ , ’ onclick ’
s t e p=” any ” i d => ’ c a l c u l a t e ( ) ’ ] ) ! ! }
=” d s f {{ { ! ! Form : : b u t t o n ( ’ C a l c u l a t e ’ ,
$ b o r e h o l e −> [ ’ c l a s s ’ => ’ btn btn−
bh num }} {{ s u c c e s s ’ , ’ s t y l e ’ => ’
$sample−> float : right ’ , ’ onclick ’
sample num }} => ’ c a l c u l a t e ( ) ’ ] ) ! ! }
” readonly { ! ! Form : : c l o s e ( ) ! ! }
r e q u i r e d ></td @endif
> </d i v>
<td><i n p u t t y p e=” </d i v>
number ” name= </d i v>
” ds Qfriction </d i v>
[ ] ” c l a s s=” @endsection
form−c o n t r o l @section ( ’ j s ’ )
to clear @parent
ds Qfriction @include ( ’ d r i l l e d s h a f t s / c a l c u l a t e ’ )
{{ $ b o r e h o l e @endsection
−>bh num }} ”
s t e p=” any ” i d
=”
ds Qfriction
{{ $ b o r e h o l e
Listing 79: drilledshafts/edit.blade.php
−>bh num }} @extends ( ’ l a y o u t s / m a s t e r ’ )
{{ $sample−> @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
sample num }} @section ( ’ content ’ )
” readonly <d i v c l a s s=” row ”>
r e q u i r e d ></td <d i v c l a s s=” c o l −md−12”>
> <d i v c l a s s=” x p a n e l ”>
<td><i n p u t t y p e=” <d i v c l a s s=” x t i t l e ”>
number ” name= <h2>E d i t − D r i l l e d S h a f t
” ds Qtotal kn F o u n d a t i o n <s m a l l >Compute
[ ] ” c l a s s=” s o i l bearing capacity
form−c o n t r o l for d r i l l e d s h a f t
to clear f o u n d a t i o n </s m a l l ></h2>
ds Qtotal kn <u l c l a s s=” nav navbar−r i g h t
{{ $ b o r e h o l e p a n e l t o o l b o x ”>
−>bh num }} ” < l i ><a c l a s s=” c o l l a p s e −
s t e p=” any ” i d l i n k ”><i c l a s s=” f a f a
=” −c h e v r o n−up”></i ></a>
ds Qtotal kn </ l i >
141
<l i c l a s s=” dropdown ”> <th><a data−t o g g l e
<a h r e f=”#” c l a s s=” =” t o o l t i p ”
dropdown−t o g g l e ” t i t l e =” ”>
data−t o g g l e=” Concrete
dropdown ” r o l e=” S t r e n g t h ( kN )
button ” aria − </a></th>
expanded=” f a l s e ” <th><a data−t o g g l e
><i c l a s s=” f a f a − =” t o o l t i p ”
wrench ”></i ></a> t i t l e =” ”>
<u l c l a s s=” dropdown− Concrete
menu” r o l e=”menu” Strength ( ton
> )</a></th>
< l i ><a h r e f=”#”> </t r >
S e t t i n g s 1</a </thead>
> <tbody>
</ l i > <?php $ i = 0 ?>
< l i ><a h r e f=”#”> @while ( $ b o r e h o l e −>i d
S e t t i n g s 2</a !=
> $drilled shafts [
</ l i > $ i ]−> b h i d )
</u l > <?php $ i++ ?>
</ l i > @endwhile
</u l > <t r >
<d i v c l a s s=” c l e a r f i x ”></d i v> <td>
</d i v> <?php
<d i v c l a s s=” x c o n t e n t ”> $ds pile size
@if ( sizeof ( $ d r i l l e d s h a f t s ) > = Helper
0) ::
<?php $ s o i l = [ ” c l a y ” , ” s i l t ” ] getValue (
?> old ( ’
{ ! ! Form : : open ( [ ’ name ’ => ’ ds pile size
u p d a t e f o r m ’ , ’ method ’ => ’) ,
’PUT ’ , ’ r o u t e ’ => [ ’ $drilled shafts
d r i l l e d s h a f t s . update ’ , [ $ i ]−>
$ p r o j e c t −>i d ] , ’ c l a s s ’ => ds pile size
’ form−h o r i z o n t a l form− ) ?>
l a b e l − l e f t ’ , ’ i d ’ => ’ <i n p u t t y p e=”
update form ’ ] ) ! ! } number ”
@foreach ( $ b o r e h o l e s as name=”
$borehole ) ds pile size
<c e n t e r > [] ” class
<h2>B o r e h o l e {{ $ b o r e h o l e =” form−
−>bh num }} <s m a l l >( control
ID#{{ $ b o r e h o l e −>i d to clear ”
} } )</ s m a l l ></h2> s t e p=”
</ c e n t e r > any ”
<t a b l e c l a s s=” t a b l e t a b l e − v a l u e=” {{
s t r i p e d t a b l e −h o v e r ”> ( float )
<thead> $ds pile size
<t r > }} ” i d=”
<th><a data−t o g g l e ds pile size
=” t o o l t i p ” {{
t i t l e =” ”>P i l e $borehole
S i z e </a></th −>bh num
> }} ”
<th><a data−t o g g l e required>
=” t o o l t i p ” </td>
t i t l e =” ”>N< <td>
sub>c</sub></ <?php $ d s N c =
a></th> Helper : :
<th><a data−t o g g l e getValue (
=” t o o l t i p ” old ( ’
t i t l e =” ”>F ds Nc ’ ) ,
C o e f f </a></th $drilled shafts
> [ $ i ]−>
<th><a data−t o g g l e d s N c ) ?>
=” t o o l t i p ” <i n p u t t y p e=”
t i t l e =” number ”
Compressive name=”
strenght of ds Nc [ ] ”
c o n c r e t e ”>f c c l a s s=”
</a></th> form−
<th><a data−t o g g l e control
=” t o o l t i p ” to clear ”
t i t l e =” Y i e l d s t e p=”
strenght of any ”
reinforcing v a l u e=” {{
b a r ”>f y </a></ ( float )
th> $ d s N c }}
<th><a data−t o g g l e ” i d=”
=” t o o l t i p ” d s N c {{
t i t l e =” S t e e l $borehole
bar diameter ” −>bh num
>SB Diameter }} ”
</a></th> required>
<th><a data−t o g g l e </td>
=” t o o l t i p ” <td>
t i t l e =” F a c t o r <?php
o f s a f e t y ”> $ds f coeff
FS</a></th> = Helper
<th><a data−t o g g l e ::
=” t o o l t i p ” getValue (
t i t l e =” old ( ’
Tension ds f coeff
capacity of ’) ,
s t e e l ”> $drilled shafts
Tension [ $ i ]−>
C a p a c i t y </a ds f coeff
></th> ) ?>
142
<i n p u t t y p e=” to clear ”
number ” s t e p=”
name=” any ”
ds f coeff v a l u e=” {{
[] ” class ( float )
=” form− $ds steel bar diameter
control }} ” i d=”
to clear ” ds steel bar diameter
s t e p=” {{
any ” $borehole
v a l u e=” {{ −>bh num
( float ) }} ”
$ds f coeff required>
}} ” i d=” </td>
ds f coeff <td>
{{ <?php $ d s f s =
$borehole Helper : :
−>bh num getValue (
}} ” old ( ’
required> ds fs ’) ,
</td> $drilled shafts
<td> [ $ i ]−>
<?php $ d s f c = d s f s ) ?>
Helper : : <i n p u t t y p e=”
getValue ( number ”
old ( ’ name=”
ds fc ’ ) , ds fs [] ”
$drilled shafts c l a s s=”
[ $ i ]−> form−
d s f c ) ?> control
<i n p u t t y p e=” to clear ”
number ” s t e p=”
name=” any ”
ds fc [ ] ” v a l u e=” {{
c l a s s=” ( float )
form− $ d s f s }}
control ” i d=”
to clear ” d s f s {{
s t e p=” $borehole
any ” −>bh num
v a l u e=” {{ }} ”
( float ) required>
$ d s f c }} </td>
” i d=” <td><i n p u t t y p e=”
d s f c {{ number ” name=
$borehole ”
−>bh num ds tension cap
}} ” [ ] ” c l a s s=”
required> form−c o n t r o l
</td> to clear ”
<td> s t e p=” any ”
<?php $ d s f y = v a l u e=” {{ (
Helper : : float )
getValue ( $drilled shafts
old ( ’ [ $ i ]−>
ds fy ’ ) , ds tension cap
$drilled shafts }} ” i d=”
[ $ i ]−> ds tension cap
d s f y ) ?> {{ $ b o r e h o l e
<i n p u t t y p e=” −>bh num }} ”
number ” r e a d o n l y ></td
name=” >
ds fy [ ] ” <td><i n p u t t y p e=”
c l a s s=” number ” name=
form− ”
control ds concrete strength kn
to clear ” [ ] ” c l a s s=”
s t e p=” form−c o n t r o l
any ” to clear
v a l u e=” {{ ds concrete strength kn
( float ) {{ $ b o r e h o l e
$ d s f y }} −>bh num }} ”
” i d=” s t e p=” any ”
d s f y {{ v a l u e=” {{ (
$borehole float )
−>bh num $drilled shafts
}} ” [ $ i ]−>
required> ds concrete strength kn
</td> }} ” i d=”
<td> ds concrete strength kn
<?php {{ $ b o r e h o l e
$ds steel bar diameter −>bh num }} ”
= Helper readonly
:: r e q u i r e d ></td
getValue ( >
old ( ’ <td><i n p u t t y p e=”
ds steel bar diameter number ” name=
’) , ”
$drilled shafts ds concrete strength ton
[ $ i ]−> [ ] ” c l a s s=”
ds steel bar diameter form−c o n t r o l
) ?> to clear
<i n p u t t y p e=” ds concrete strength ton
number ” {{ $ b o r e h o l e
name=” −>bh num }} ”
ds steel bar diameter s t e p=” any ”
[] ” class v a l u e=” {{ (
=” form− float )
control $drilled shafts
143
[ $ i ]−> $ b o r e h o l e −>
ds concrete strength ton bh num }} {{
}} ” i d=” $k }} ”
ds concrete strength ton r e a d o n l y ></td
{{ $ b o r e h o l e >
−>bh num }} ” <td><i n p u t t y p e=”
readonly number ” name=
r e q u i r e d ></td ”
> ds num of blows
</t r > [ ] ” c l a s s=”
</tbody> form−c o n t r o l
</ t a b l e > ds num of blows
<t a b l e c l a s s=” t a b l e t a b l e − {{ $ b o r e h o l e
s t r i p e d t a b l e −h o v e r ”> −>bh num }} ”
<thead> s t e p=” any ”
<t r > v a l u e=” {{ (
<th><a data−t o g g l e float )
=” t o o l t i p ” $samples [ $ j
t i t l e =” Depth ]−>
of footing sample num of blows
below l o w e s t }} ” i d=”
adjacent s o i l ds num of blows
s u r f a c e ”>D< {{ $ b o r e h o l e
sub>f </sub></ −>bh num }}
a></th> {{ $k }} ”
<th><a data−t o g g l e r e a d o n l y ></td
=” t o o l t i p ” >
t i t l e =”Number <td>
o f b l o w s ”> <?php
SPT N−v a l u e </ $ds soil select id
a></th> = ’
<th>S o i l Type</th> ds soil
<th><a data−t o g g l e ’ .
=” t o o l t i p ” $borehole
t i t l e =” ”>c</a −>
></th> bh num
<th><a data−t o g g l e . ’
=” t o o l t i p ” ’ .
t i t l e =” ”>Q< $k ;
sub>b a s e </sub $ds soil =
></a></th>
<th><a data−t o g g l e Helper
=” t o o l t i p ” ::
t i t l e =” ”>f </a getValue
></th> ( old (
<th><a data−t o g g l e ’
=” t o o l t i p ” ds soil
t i t l e =” ”>Q< ’) ,
sub>f r i c t i o n $drilled shaft
</sub></a></ −>
th> ds soil
<th><a data−t o g g l e );
=” t o o l t i p ” ?>
t i t l e =” ”>Q< { ! ! Form : :
sub>t o t a l </ select ( ’
sub> ( kN )</a ds soil []
></th> ’ , $soil ,
<th><a data−t o g g l e $ds soil
=” t o o l t i p ” , array ( ’
t i t l e =” ”>Q< c l a s s ’ =>
sub>t o t a l </ ’ btn btn
sub> ( t o n )</a −d e f a u l t
></th> ds soil
</t r > {{
</thead> $borehole
<tbody> −>bh num
<?php $ j = 0 ; $k = 1 ; }} ’ , ’
?> placeholder
@foreach ( ’ => ’
$drilled shafts S o i l type
as $ d r i l l e d s h a f t ... ’ , ’
) required ’
@ i f ( $ d r i l l e d s h a f t −> => ’ t r u e
b h i d === ’ , ’ id ’
$ b o r e h o l e −>i d ) =>
{ ! ! Form : : h i d d e n ( ’ $ds soil select id
sample id [ ] ’ , )) !!}
$ d r i l l e d s h a f t −> </td>
sample id ) ! ! } <td><i n p u t t y p e=”
{ ! ! Form : : h i d d e n ( ’ number ” name=
drilled id [] ’ , ” ds c [ ] ”
$ d r i l l e d s h a f t −> c l a s s=” form−
id ) ! ! } control
<t r > to clear
<td><i n p u t t y p e=” d s c {{
number ” name= $ b o r e h o l e −>
” ds depth [ ] ” bh num }} ”
c l a s s=” form− s t e p=” any ”
control v a l u e=” {{ (
d s d e p t h {{ float )
$ b o r e h o l e −> $drilled shaft
bh num }} ” −>d s c }} ” i d
s t e p=” any ” =” d s c {{
v a l u e=” {{ ( $ b o r e h o l e −>
float ) bh num }} {{
$samples [ $ j $k }} ”
]−> s a m p l e t o readonly
}} ” i d=” r e q u i r e d ></td
d s d e p t h {{ >
144
<td><i n p u t t y p e=” s t e p=” any ”
number ” name= v a l u e=” {{ (
” ds Qbase [ ] ” float )
c l a s s=” form− $drilled shaft
control −>
to clear ds Qtotal ton
d s Q b a s e {{ }} ” i d=”
$ b o r e h o l e −> ds Qtotal ton
bh num }} ” {{ $ b o r e h o l e
s t e p=” any ” −>bh num }}
v a l u e=” {{ ( {{ $k }} ”
float ) readonly
$drilled shaft r e q u i r e d ></td
−>d s Q b a s e }} >
” i d=” <t d s t y l e=” t e x t −
d s Q b a s e {{ align : center ;
$ b o r e h o l e −> ”>
bh num }} {{ <?php (
$k }} ” $drilled shaft
readonly −>
r e q u i r e d ></td ds is chosen
> == 1 ) ?
<td><i n p u t t y p e=” $checked
number ” name= = ”
” ds f [ ] ” checked ”
c l a s s=” form− :
control $checked
to clear = ”” ?>
d s f {{ <i n p u t t y p e=”
$ b o r e h o l e −> checkbox ”
bh num }} ” name=”
s t e p=” any ” ds is chosen
v a l u e=” {{ ( [ ] ” value
float ) =” {{
$drilled shaft $drilled shaft
−>d s f }} ” i d −>
=” d s f {{ sample id
$ b o r e h o l e −> }} ”
bh num }} {{ s t y l e=”
$k }} ” text−
readonly align :
r e q u i r e d ></td center ”
> {{
<td><i n p u t t y p e=” $checked
number ” name= }}>
” ds Qfriction </td>
[ ] ” c l a s s=” </t r >
form−c o n t r o l <?php $k++ ?>
to clear @endif
ds Qfriction <?php $ j++ ?>
{{ $ b o r e h o l e @endforeach
−>bh num }} ” </tbody>
s t e p=” any ” </ t a b l e >
v a l u e=” {{ ( <b r/>
float ) { ! ! Form : : h i d d e n ( ’ b h i d [ ] ’ ,
$drilled shaft $ b o r e h o l e −>i d ) ! ! }
−> { ! ! Form : : h i d d e n ( ’
ds Qfriction n u m o f s a m p l e s [ ] ’ , $k −1)
}} ” i d=” !!}
ds Qfriction @endforeach
{{ $ b o r e h o l e <d i v c l a s s=” l n s o l i d ”></d i v>
−>bh num }} { ! ! Form : : h i d d e n ( ’ p r o j i d ’ ,
{{ $k }} ” $ p r o j e c t −>i d ) ! ! }
readonly { ! ! Form : : h i d d e n ( ’ d s i s c h o s e n
r e q u i r e d ></td [ ] ’ , −1) ! ! }
> { ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’
<td><i n p u t t y p e=” Back ’ , array ( ’ c l a s s ’ => ’
number ” name= btn btn−d e f a u l t ’ ) ) ! ! }
” ds Qtotal kn { ! ! Form : : b u t t o n ( ’ C l e a r ’ , [ ’
[ ] ” c l a s s=” c l a s s ’ => ’ btn btn−d a n g e r
form−c o n t r o l ’ , ’ o n c l i c k ’ => ’
to clear clearForm ( ) ’ ] ) ! ! }
ds Qtotal kn { ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’
{{ $ b o r e h o l e c l a s s ’ => ’ btn btn−
−>bh num }} ” p r i m a r y ’ , ’ s t y l e ’ => ’
s t e p=” any ” float : right ’ , ’ onclick ’
v a l u e=” {{ ( => ’ c a l c u l a t e ( ) ’ ] ) ! ! }
float ) { ! ! Form : : b u t t o n ( ’ C a l c u l a t e ’ ,
$drilled shaft [ ’ c l a s s ’ => ’ btn btn−
−> s u c c e s s ’ , ’ s t y l e ’ => ’
ds Qtotal kn float : right ’ , ’ onclick ’
}} ” i d=” => ’ c a l c u l a t e ( ) ’ ] ) ! ! }
ds Qtotal kn { ! ! Form : : c l o s e ( ) ! ! }
{{ $ b o r e h o l e @endif
−>bh num }} </d i v>
{{ $k }} ” </d i v>
readonly </d i v>
r e q u i r e d ></td </d i v>
> @endsection
<td><i n p u t t y p e=” @section ( ’ j s ’ )
number ” name= @parent
” @include ( ’ d r i l l e d s h a f t s / c a l c u l a t e ’ )
ds Qtotal ton @endsection
[ ] ” c l a s s=”
form−c o n t r o l
to clear
ds Qtotal ton
{{ $ b o r e h o l e
Listing 80: drilledshafts/in-
−>bh num }} ” dex.blade.php
145
@extends ( ’ l a y o u t s / m a s t e r ’ ) =” t o o l t i p ”
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) t i t l e =”
@section ( ’ content ’ ) Tension
<d i v c l a s s=” row ”> capacity of
<d i v c l a s s=” c o l −md−12”> s t e e l ”>
<d i v c l a s s=” x p a n e l ”> Tension
<d i v c l a s s=” x t i t l e ”> C a p a c i t y </a
<h2>D r i l l e d S h a f t F o u n d a t i o n < ></th>
s m a l l >Compute s o i l <th><a data−t o g g l e
bearing capacity for =” t o o l t i p ”
d r i l l e d s h a f t foundation t i t l e =” ”>
</s m a l l ></h2> Concrete
<u l c l a s s=” nav navbar−r i g h t S t r e n g t h ( kN )
p a n e l t o o l b o x ”> </a></th>
< l i ><a c l a s s=” c o l l a p s e − <th><a data−t o g g l e
l i n k ”><i c l a s s=” f a f a =” t o o l t i p ”
−c h e v r o n−up”></i ></a> t i t l e =” ”>
</ l i > Concrete
< l i c l a s s=” dropdown ”> Strength ( ton
<a h r e f=”#” c l a s s=” )</a></th>
dropdown−t o g g l e ” </t r >
data−t o g g l e=” </thead>
dropdown ” r o l e=” <tbody>
button ” aria − <?php $ i = 0 ?>
expanded=” f a l s e ” @while ( $ b o r e h o l e −>i d
><i c l a s s=” f a f a − !=
wrench ”></i ></a> $drilled shafts [
<u l c l a s s=” dropdown− $ i ]−> b h i d )
menu” r o l e=”menu” <?php $ i++ ?>
> @endwhile
< l i ><a h r e f=”#”> <t r >
S e t t i n g s 1</a <td >{{ ( f l o a t )
> $drilled shafts
</ l i > [ $ i ]−>
< l i ><a h r e f=”#”> ds pile size
S e t t i n g s 2</a }}</td>
> <td >{{ ( f l o a t )
</ l i > $drilled shafts
</u l > [ $ i ]−>d s N c
</ l i > }}</td>
</u l > <td >{{ ( f l o a t )
<d i v c l a s s=” c l e a r f i x ”></d i v> $drilled shafts
</d i v> [ $ i ]−>
<d i v c l a s s=” x c o n t e n t ”> ds f coeff
@if ( sizeof ( $ d r i l l e d s h a f t s ) > }}</td>
0) <td >{{ ( f l o a t )
@foreach ( $ b o r e h o l e s as $drilled shafts
$borehole ) [ $ i ]−> d s f c
<c e n t e r > }}</td>
<h2>B o r e h o l e {{ $ b o r e h o l e <td >{{ ( f l o a t )
−>bh num }} <s m a l l >( $drilled shafts
ID#{{ $ b o r e h o l e −>i d [ $ i ]−> d s f y
} } )</ s m a l l ></h2> }}</td>
</ c e n t e r > <td >{{ ( f l o a t )
<t a b l e c l a s s=” t a b l e t a b l e − $drilled shafts
s t r i p e d t a b l e −h o v e r ”> [ $ i ]−>
<thead> ds steel bar diameter
<t r > }}</td>
<th><a data−t o g g l e <td >{{ ( f l o a t )
=” t o o l t i p ” $drilled shafts
t i t l e =” ”>P i l e [ $ i ]−> d s f s
S i z e </a></th }}</td>
> <td >{{ ( f l o a t )
<th><a data−t o g g l e $drilled shafts
=” t o o l t i p ” [ $ i ]−>
t i t l e =” ”>N< ds tension cap
sub>c</sub></ }}</td>
a></th> <td >{{ ( f l o a t )
<th><a data−t o g g l e $drilled shafts
=” t o o l t i p ” [ $ i ]−>
t i t l e =” ”>F ds concrete strength kn
C o e f f </a></th }}</td>
> <td >{{ ( f l o a t )
<th><a data−t o g g l e $drilled shafts
=” t o o l t i p ” [ $ i ]−>
t i t l e =” ds concrete strength ton
Compressive }}</td>
strenght of </t r >
c o n c r e t e ”>f c </tbody>
</a></th> </ t a b l e >
<th><a data−t o g g l e <t a b l e c l a s s=” t a b l e t a b l e −
=” t o o l t i p ” s t r i p e d t a b l e −h o v e r ”>
t i t l e =” Y i e l d <thead>
strenght of <t r >
reinforcing <th><a data−t o g g l e
b a r ”>f y </a></ =” t o o l t i p ”
th> t i t l e =” Depth
<th><a data−t o g g l e of footing
=” t o o l t i p ” below l o w e s t
t i t l e =” S t e e l adjacent s o i l
bar diameter ” s u r f a c e ”>D<
>SB Diameter sub>f </sub></
</a></th> a></th>
<th><a data−t o g g l e <th><a data−t o g g l e
=” t o o l t i p ” =” t o o l t i p ”
t i t l e =” F a c t o r t i t l e =”Number
o f s a f e t y ”> o f b l o w s ”>
FS</a></th> SPT N−v a l u e </
<th><a data−t o g g l e a></th>
146
<th>S o i l Type</th> <d i v c l a s s=” l n s o l i d ”></d i v>
<th><a data−t o g g l e { ! ! Form : : open ( [ ’ method ’ => ’
=” t o o l t i p ” DELETE ’ , ’ r o u t e ’ => [ ’
t i t l e =” ”>c</a d r i l l e d s h a f t s . destroy ’ ,
></th> $ p r o j e c t −>i d ] , ’ o n s ub m it ’
<th><a data−t o g g l e => ’ r e t u r n c o n f i r m ( ”
=” t o o l t i p ” D e l e t e SBC d a t a f o r
t i t l e =” ”>Q< d r i l l e d shaft foundation
sub>b a s e </sub permanently ?”) ’ ] ) ! ! }
></a></th> { ! ! Form : : s u b m i t ( ’ D e l e t e ’ , [ ’
<th><a data−t o g g l e c l a s s ’ => ’ btn btn−d a n g e r
=” t o o l t i p ” ’ ]) !!}
t i t l e =” ”>f </a <a h r e f=” {{ r o u t e ( ’
></th> drilledshafts . edit ’ ,
<th><a data−t o g g l e $ p r o j e c t −>i d ) }} ” c l a s s=”
=” t o o l t i p ” btn btn−i n f o ” s t y l e=”
t i t l e =” ”>Q< f l o a t : r i g h t ”><i c l a s s=” f a
sub>f r i c t i o n f a −e d i t m−r i g h t −x s ”></i >
</sub></a></ E d i t </a>
th> { ! ! Form : : c l o s e ( ) ! ! }
<th><a data−t o g g l e @endif
=” t o o l t i p ” </d i v>
t i t l e =” ”>Q< </d i v>
sub>t o t a l </ </d i v>
sub> ( kN )</a </d i v>
></th> @endsection
<th><a data−t o g g l e
=” t o o l t i p ”
t i t l e =” ”>Q<
sub>t o t a l </
sub> ( t o n )</a
Listing 81: emails/create.blade.php
></th> @extends ( ’ l a y o u t s / m a s t e r ’ )
</t r > @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
</thead> @section ( ’ s t y l e s h e e t s ’ )
<tbody> @parent
<?php $ j = 0 ?> <!−− e d i t o r −−>
@foreach ( <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / f o n t −awesome .
$drilled shafts c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
as $ d r i l l e d s h a f t <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / e d i t o r / e x t e r n a l
) / g o o g l e −code−p r e t t i f y / p r e t t i f y . c s s ’ ) }} ”
@ i f ( $ d r i l l e d s h a f t −> r e l =” s t y l e s h e e t ”>
b h i d === <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / e d i t o r / i n d e x .
$ b o r e h o l e −>i d ) c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
<?php ( $ d r i l l e d s h a f t <!−− s e l e c t 2 −−>
−>d s i s c h o s e n == <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / s e l e c t / s e l e c t 2 .
1) ? $ c l a s s = ” min . c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
chosen ” : $ c l a s s <!−− s w i t c h e r y −−>
= ” ” ?> <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / s w i t c h e r y /
<t r c l a s s=” {{ $ c l a s s s w i t c h e r y . min . c s s ’ ) }} ” r e l =” s t y l e s h e e t ”
}} ”> />
<td >{{ ( f l o a t ) @endsection
$samples [ $ j @section ( ’ content ’ )
]−> s a m p l e t o <d i v c l a s s=” row ”>
}}</td> <d i v c l a s s=” c o l −md−12”>
<td >{{ ( f l o a t ) <d i v c l a s s=” x p a n e l ”>
$samples [ $ j <d i v c l a s s=” x t i t l e ”>
]−> <h2>C r e a t e Email </h2>
sample num of blows <u l c l a s s=” nav navbar−r i g h t
}}</td> p a n e l t o o l b o x ”>
<td >{{ ( < l i ><a c l a s s=” c o l l a p s e −
$drilled shaft l i n k ”><i c l a s s=” f a f a
−> d s s o i l == −c h e v r o n−up”></i ></a>
0) ? ’ clay ’ : ’ </ l i >
s i l t ’ }}</td> < l i c l a s s=” dropdown ”>
<td >{{ ( f l o a t ) <a h r e f=”#” c l a s s=”
$drilled shaft dropdown−t o g g l e ”
−>d s c }}</td data−t o g g l e=”
> dropdown ” r o l e=”
<td >{{ ( f l o a t ) button ” aria −
$drilled shaft expanded=” f a l s e ”
−>d s Q b a s e ><i c l a s s=” f a f a −
}}</td> wrench ”></i ></a>
<td >{{ ( f l o a t ) <u l c l a s s=” dropdown−
$drilled shaft menu” r o l e=”menu”
−>d s f }}</td >
> < l i ><a h r e f=”#”>
<td >{{ ( f l o a t ) S e t t i n g s 1</a
$drilled shaft >
−> </ l i >
ds Qfriction < l i ><a h r e f=”#”>
}}</td> S e t t i n g s 2</a
<td >{{ ( f l o a t ) >
$drilled shaft </ l i >
−> </u l >
ds Qtotal kn </ l i >
}}</td> </u l >
<td >{{ ( f l o a t ) <d i v c l a s s=” c l e a r f i x ”></d i v>
$drilled shaft </d i v>
−> <d i v c l a s s=” x c o n t e n t ”>
ds Qtotal ton { ! ! Form : : open ( [ ’ name ’ => ’
}}</td> e m a i l f o r m ’ , ’ method ’ =>
</t r > ’POST ’ , ’ r o u t e ’ => ’
@endif e m a i l s . s e n d ’ , ’ o n su b m it ’
<?php $ j++ ?> => ’ document . e m a i l f o r m .
@endforeach m e s s a g e . v a l u e = $(”#
</tbody> e d i t o r ” ) . html ( ) ’ ] ) ! ! }
</ t a b l e > <d i v c l a s s=” form−g r o u p ”>
<b r/> { ! ! Form : : l a b e l ( ’ t o ’ , ’ To
@endforeach ∗ ’) !!}
147
{ ! ! Form : : e m a i l ( ’ t o ’ , o l d ( :11
’ t o ’ ) , [ ’ c l a s s ’ => ’ px
form−c o n t r o l ’ , ’ ”
r e q u i r e d ’ => ’ t r u e ’ ] ) >
!!} Small
</d i v> </
<d i v c l a s s=” form−g r o u p ”> p
{ ! ! Form : : l a b e l ( ’ s u b j e c t ’ , >
’ Subject ∗ ’ ) ! ! } </a>
{ ! ! Form : : t e x t ( ’ s u b j e c t ’ , </ l i >
old ( ’ subject ’ ) , [ ’ </u l >
c l a s s ’ => ’ form− </d i v>
control ’ , ’ required ’ <d i v c l a s s=” btn−g r o u p ”
=> ’ t r u e ’ ] ) ! ! } >
</d i v> <a c l a s s=” btn ”
<d i v c l a s s=” form−g r o u p ”> data−e d i t=”
{ ! ! Form : : l a b e l ( ’ ’ , ’ b o l d ” t i t l e =”
Message ’ ) ! ! } Bold ( C t r l /
<d i v i d=” a l e r t s ”></d i v> Cmd+B) ”><i
<d i v c l a s s=” btn−t o o l b a r c l a s s=” i c o n −
e d i t o r ” data−r o l e=” b o l d ”></i ></a
e d i t o r −t o o l b a r ” data− >
t a r g e t=”#e d i t o r ”> <a c l a s s=” btn ”
<d i v c l a s s=” btn−g r o u p ” data−e d i t=”
> italic” title
<a c l a s s=” btn =” I t a l i c (
dropdown− C t r l /Cmd+I ) ”
t o g g l e ” data− ><i c l a s s=”
t o g g l e=” icon−i t a l i c ”
dropdown ” ></i ></a>
t i t l e =” Font <a c l a s s=” btn ”
S i z e ”><i data−e d i t=”
c l a s s=” i c o n − strikethrough
t e x t −h e i g h t ” ” t i t l e =”
></i >  ;<b Strikethrough
c l a s s=” c a r e t ”><i c l a s s=”
”></b></a> icon−
<u l c l a s s=” strikethrough
dropdown−menu ”></i ></a>
”> <a c l a s s=” btn ”
<l i > data−e d i t=”
<a data− underline ”
e d i t= t i t l e =”
” Underline (
fontSize C t r l /Cmd+U) ”
5 ”> ><i c l a s s=”
<p icon−
style u n d e r l i n e ”></
= i ></a>
” </d i v>
font <d i v c l a s s=” btn−g r o u p ”
− >
size <a c l a s s=” btn ”
:17 data−e d i t=”
px insertunorderedlist
” ” t i t l e =”
> Bullet l i s t ”
Huge ><i c l a s s=”
</ i c o n −l i s t −u l ”
p ></i ></a>
> <a c l a s s=” btn ”
</a> data−e d i t=”
</ l i > insertorderedlist
<l i > ” t i t l e =”
<a data− Number l i s t ”
e d i t= ><i c l a s s=”
” i c o n −l i s t −o l ”
fontSize ></i ></a>
3 ”> <a c l a s s=” btn ”
<p data−e d i t=”
style outdent ”
= t i t l e =” Reduce
” indent (
font S h i f t+Tab ) ”><
− i c l a s s=” i c o n
size −i n d e n t − l e f t ”
:14 ></i ></a>
px <a c l a s s=” btn ”
” data−e d i t=”
> indent ” t i t l e
Normal =” I n d e n t ( Tab
</ ) ”><i c l a s s=”
p i c o n −i n d e n t −
> r i g h t ”></i ></
</a> a>
</ l i > </d i v>
<l i > <d i v c l a s s=” btn−g r o u p ”
<a data− >
e d i t= <a c l a s s=” btn ”
” data−e d i t=”
fontSize justifyleft”
1 ”> t i t l e =” A l i g n
<p Left ( Ctrl /
style Cmd+L ) ”><i
= c l a s s=” i c o n −
” align −l e f t ”
font ></i ></a>
− <a c l a s s=” btn ”
size data−e d i t=”
148
justifycenter <!−− t a g s −−>
” t i t l e =” < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / t a g s / j q u e r y .
Center ( C t r l / t a g s i n p u t . min . j s ’ ) }} ”></ s c r i p t >
Cmd+E) ”><i <!−− s w i t c h e r y −−>
c l a s s=” i c o n − < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / s w i t c h e r y /
a l i g n −c e n t e r ” s w i t c h e r y . min . j s ’ ) }} ”></ s c r i p t >
></i ></a> <!−− d a t e r a n g e p i c k e r −−>
<a c l a s s=” btn ” < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s /moment . min2 . j s
data−e d i t=” ’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ”></ s c r i p t >
justifyright” < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / d a t e p i c k e r /
t i t l e =” A l i g n d a t e r a n g e p i c k e r . j s ’ ) }} ” t y p e=” t e x t /
Right ( C t r l / j a v a s c r i p t ”></ s c r i p t >
Cmd+R) ”><i <!−− r i c h t e x t e d i t o r −−>
c l a s s=” i c o n − < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / e d i t o r /
a l i g n −r i g h t ” b o o t s t r a p −wysiwyg . j s ’ ) }} ”></ s c r i p t >
></i ></a> < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / e d i t o r / e x t e r n a l
<a c l a s s=” btn ” / j q u e r y . h o t k e y s . j s ’ ) }} ”></ s c r i p t >
data−e d i t=” < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / e d i t o r / e x t e r n a l
justifyfull” / g o o g l e −code−p r e t t i f y / p r e t t i f y . j s ’ ) }} ”
t i t l e =” ></ s c r i p t >
Justify ( Ctrl <!−− s e l e c t 2 −−>
/Cmd+J ) ”><i < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / s e l e c t / s e l e c t 2 .
c l a s s=” i c o n − f u l l . j s ’ ) }} ”></ s c r i p t >
a l i g n −j u s t i f y <!−− form v a l i d a t i o n −−>
”></i ></a> < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / p a r s l e y / p a r s l e y
</d i v> . min . j s ’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ” ></
<d i v c l a s s=” btn−g r o u p ” script >
> <!−− t e x t a r e a r e s i z e −−>
<a c l a s s=” btn ” < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / t e x t a r e a /
t i t l e =” I n s e r t a u t o s i z e . min . j s ’ ) }} ”></ s c r i p t >
p i c t u r e ( or <!−− A u t o c o m p l e t e −−>
j u s t drag & < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / a u t o c o m p l e t e /
drop ) ” i d=” c o u n t r i e s . j s ’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ”
p i c t u r e B t n ”>< ></ s c r i p t >
i c l a s s=” i c o n < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / a u t o c o m p l e t e /
−p i c t u r e ”></i j q u e r y . a u t o c o m p l e t e . j s ’ ) }} ”></ s c r i p t >
></a> <!−− form v a l i d a t i o n −−>
<i n p u t t y p e=” f i l e ” < s c r i p t t y p e=” t e x t / j a v a s c r i p t ”>
data−r o l e=” $ ( document ) . r e a d y ( f u n c t i o n ( ) {
magic−o v e r l a y $ . listen ( ’ parsley : f i e l d : validate ’ ,
” data−t a r g e t function () {
=”#p i c t u r e B t n validateFront () ;
” data−e d i t=” }) ;
insertImage ” $ ( ’#demo−form . btn ’ ) . on ( ’ c l i c k ’ ,
/> function () {
</d i v> $ ( ’#demo−form ’ ) . p a r s l e y ( ) . v a l i d a t e
</d i v> () ;
<t e x t a r e a name=” m e s s a g e ” validateFront () ;
i d=” m e s s a g e ” s t y l e=” }) ;
d i s p l a y : none ; ”></ var v a l i d a t e F r o n t = f u n c t i o n ( ) {
textarea> i f ( true === $ ( ’#demo−form ’ ) .
<d i v i d=” e d i t o r ” parsley () . isValid () ) {
c o n t e n t e d i t a b l e=” t r u e $ ( ’ . bs−c a l l o u t −i n f o ’ ) .
”></d i v> removeClass ( ’ hidden ’ ) ;
</d i v> $ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) .
<?php $ f i l e p a t h = ” r e p o r t s / addClass ( ’ hidden ’ ) ;
Report−$ p r o j e c t −>i d . p d f ” } else {
?> $ ( ’ . bs−c a l l o u t −i n f o ’ ) . a d d C l a s s
@if ( f i l e e x i s t s ( $ f i l e p a t h ) ) ( ’ hidden ’ ) ;
<?php $ f i l e p a t h = URL : : a s s e t ( $ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) .
” r e p o r t s / Report−$ p r o j e c t removeClass ( ’ hidden ’ ) ;
−>i d . p d f ” ) ?> }
< i c l a s s=” f a f a −p a p e r c l i p ”></i };
> {!! link to asset ( }) ;
$file path , ’ Geotechnical
I n v e s t i g a t i o n Report − ’ $ ( document ) . r e a d y ( f u n c t i o n ( ) {
. $ p r o j e c t −>p r o j n a m e ) $ . listen ( ’ parsley : f i e l d : validate ’ ,
!!} function () {
{ ! ! Form : : h i d d e n ( ’ validateFront () ;
r e p o r t e x i s t s ’ , 1) ! ! } }) ;
{ ! ! Form : : h i d d e n ( ’ f i l e p a t h ’ , $ ( ’#demo−form2 . btn ’ ) . on ( ’ c l i c k ’ ,
$file path ) !!} function () {
@else $ ( ’#demo−form2 ’ ) . p a r s l e y ( ) .
< i c l a s s=” f a f a −t i m e s ”></i > validate () ;
R e p o r t h a s n o t been validateFront () ;
generated . }) ;
{ ! ! Form : : h i d d e n ( ’ var v a l i d a t e F r o n t = f u n c t i o n ( ) {
r e p o r t e x i s t s ’ , 0) ! ! } i f ( true === $ ( ’#demo−form2 ’ ) .
{ ! ! Form : : h i d d e n ( ’ f i l e p a t h ’ , parsley () . isValid () ) {
0) ! ! } $ ( ’ . bs−c a l l o u t −i n f o ’ ) .
@endif removeClass ( ’ hidden ’ ) ;
<d i v c l a s s=” l n s o l i d ”></d i v> $ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) .
{ ! ! Form : : h i d d e n ( ’ p r o j i d ’ , addClass ( ’ hidden ’ ) ;
$ p r o j e c t −>i d ) ! ! } } else {
{ ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ $ ( ’ . bs−c a l l o u t −i n f o ’ ) . a d d C l a s s
Back ’ , array ( ’ c l a s s ’ => ’ ( ’ hidden ’ ) ;
btn btn−d e f a u l t ’ ) ) ! ! } $ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) .
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’ removeClass ( ’ hidden ’ ) ;
c l a s s ’ => ’ btn btn− }
p r i m a r y ’ , ’ s t y l e ’ => ’ };
float : right ’ ]) !!} }) ;
{ ! ! Form : : c l o s e ( ) ! ! } try {
</d i v> h l j s . initHighlightingOnLoad () ;
</d i v> } c a t c h ( e r r ) {}
</d i v> </ s c r i p t >
</d i v> <!−− / form v a l i d a t i o n −−>
@endsection <!−− e d i t o r −−>
@section ( ’ j s ’ ) <s c r i p t >
@parent $ ( document ) . r e a d y ( f u n c t i o n ( ) {
149
$ ( ’ . xcxc ’ ) . c l i c k ( f u n c t i o n ( ) { window . p r e t t y P r i n t && p r e t t y P r i n t ( ) ;
$ ( ’#s e c t i o n t e x t ’ ) . v a l ( $ ( ’#e d i t o r ’ }) ;
) . html ( ) ) ; </ s c r i p t >
}) ; <!−− / e d i t o r −−>
}) ; @endsection
$( function () {
function initToolbarBootstrapBindings
() { Listing 82: emails/send.blade.php
var f o n t s = [ ’ A r i a l ’ , ’ A r i a l Black
’ , ’ C a l i b r i ’ , ’ Cambria ’ , ’ <p > { ! ! $body ! ! } < / p>
Comic Sans MS ’ , ’ C o u r i e r ’ ,
’ C o u r i e r New ’ , ’ H e l v e t i c a ’ , ’ Impact ’ ,
’ L u c i d a Grande ’ , ’ L u c i d a Sans ’ , ’
Sans ’ , ’ S e r i f ’ , ’ Tahoma ’ , ’ Times ’ Listing 83: errors/403.blade.php
,
@extends ( ’ l a y o u t s / e r r o r m a s t e r ’ )
’ Times New Roman ’ , ’ Verdana ’ ] ,
@ s e c t i o n ( ’ e r r o r n a m e ’ , ’ 403 ’ )
f o n t T a r g e t = $ ( ’ [ t i t l e =Font ] ’ )
@section ( ’ e r r o r d e s c r i p t i o n 1 ’ , ’ Forbidden ’ )
. s i b l i n g s ( ’ . dropdown−menu
@ s e c t i o n ( ’ e r r o r d e s c r i p t i o n 2 ’ , ’ S o r r y , you a r e
’);
not permitted to perform the r e q u e s t e d
$ . each ( f o n t s , f u n c t i o n ( i d x ,
operation . ’ )
fontName ) {
f o n t T a r g e t . append ( $ ( ’< l i ><a
data−e d i t =”fontName ’ +
fontName + ’ ” s t y l e =” f o n t
−f a m i l y : \ ’ ’ + fontName +
Listing 84: errors/404.blade.php
’ \ ’” > ’ + fontName + ’</a @extends ( ’ layouts / errormaster ’)
></ l i > ’ ) ) ; @section ( ’ e r r o r n a m e ’ , ’ 404 ’ )
}) ; @section ( ’ error description1 ’ , ’ Not Found ’ )
$ ( ’ a [ t i t l e ] ’ ) . t o o l t i p ({ @section ( ’ error description2 ’ , ’ Sorry , the
c o n t a i n e r : ’ body ’ page you a r e l o o k i n g f o r is not found . ’ )
}) ;
$ ( ’ . dropdown−menu i n p u t ’ ) . c l i c k (
function () {
return false ; Listing 85: errors/503.blade.php
})
. change ( f u n c t i o n ( ) { @extends ( ’ l a y o u t s / e r r o r m a s t e r ’ )
$ ( t h i s ) . p a r e n t ( ’ . dropdown− @ s e c t i o n ( ’ e r r o r n a m e ’ , ’ 404 ’ )
menu ’ ) . s i b l i n g s ( ’ . @section ( ’ e r r o r d e s c r i p t i o n 1 ’ , ’ Service
dropdown−t o g g l e ’ ) . Unavailable ’ )
dropdown ( ’ t o g g l e ’ ) ; @ s e c t i o n ( ’ e r r o r d e s c r i p t i o n 2 ’ , ’ Be r i g h t back .
}) ’)
. keydown ( ’ e s c ’ , f u n c t i o n ( ) {
t h i s . value = ’ ’ ;
$ ( t h i s ) . change ( ) ;
}) ; Listing 86: includes/clear-
$ ( ’ [ data−r o l e=magic−o v e r l a y ] ’ ) . form.blade.php
each ( f u n c t i o n ( ) {
var o v e r l a y = $ ( t h i s ) , <!−− c l e a r −−>
t a r g e t = $ ( o v e r l a y . data ( ’ < s c r i p t t y p e=” t e x t / j a v a s c r i p t ”>
target ’ ) ) ; f u n c t i o n clearForm ( ) {
overlay . c s s ( ’ opacity ’ , 0) . c s s ( $( ’ . t o c l e a r ’ ) . val ( ’ ’ ) ;
’ position ’ , ’ absolute ’ ) . $ ( ’ i n p u t : c h e c k b o x : c h e c k e d ’ ) . prop ( ’
offset ( target . offset () ) . checked ’ , f a l s e ) ;
width ( t a r g e t . outerWidth ( ) }
) . height ( target . </ s c r i p t >
outerHeight () ) ; <!−− / c l e a r −−>
}) ;
i f ( ” onwebkitspeechchange ” in
document . c r e a t e E l e m e n t ( ” i n p u t
”) ) {
Listing 87: includes/header.blade.php
v a r e d i t o r O f f s e t = $ ( ’#e d i t o r ’ <!−− Top n a v i g a t i o n −−>
) . offset () ; <d i v c l a s s=” t o p n a v ”>
$ ( ’#v o i c e B t n ’ ) . c s s ( ’ p o s i t i o n ’ ,
’ a b s o l u t e ’ ) . o f f s e t ({ <d i v c l a s s=” nav menu ”>
t o p : e d i t o r O f f s e t . top , <nav c l a s s=” ” r o l e=” n a v i g a t i o n ”>
left : editorOffset . left + <d i v c l a s s=” nav t o g g l e ”>
$ ( ’#e d i t o r ’ ) . <a i d=” m e n u t o g g l e ”><i c l a s s=”
i n n e r W i d t h ( ) − 35 f a f a −b a r s ”></i ></a>
}) ; </d i v>
} else {
$ ( ’#v o i c e B t n ’ ) . h i d e ( ) ; <u l c l a s s=” nav navbar−nav navbar−
} r i g h t ”>
}; < l i c l a s s=” ”>
<a h r e f=” j a v a s c r i p t : ; ”
f u n c t i o n showErrorAlert ( reason , d e t a i l c l a s s=” u s e r − p r o f i l e
) { dropdown−t o g g l e ” data
v a r msg = ’ ’ ; −t o g g l e=” dropdown ”
i f ( r e a s o n === ’ u n s u p p o r t e d − f i l e − a r i a −expanded=” f a l s e ”
type ’ ) { >
msg = ” Unsupported f o r m a t ” + <img s r c=” {{ URL : :
detail ; a s s e t ( Auth : : u s e r
} else { ( )−>image ) }} ”
c o n s o l e . log ( ” e r r o r uploading a l t=” ”>{{ Auth : :
f i l e ” , reason , d e t a i l ) ; u s e r ( )−>name }}
} <span c l a s s=” f a f a −
$ ( ’<d i v c l a s s =” a l e r t ”> <b u t t o n a n g l e −down”></
t y p e=”b u t t o n ” c l a s s =” c l o s e ” span>
data−d i s m i s s =” a l e r t ”>&t i m e s </a>
; </ button> ’ + <u l c l a s s=” dropdown−menu
’<s t r o n g >F i l e u p l o a d e r r o r </ dropdown−usermenu
s t r o n g > ’ + msg + ’ </d i v a n i m a t e d fadeInDown
> ’ ) . prependTo ( ’#a l e r t s ’ ) ; p u l l −r i g h t ”>
}; < l i ><a h r e f=” {{ r o u t e
initToolbarBootstrapBindings () ; ( ’ u s e r s . show ’ ,
$ ( ’#e d i t o r ’ ) . wysiwyg ( { Auth : : u s e r ( )−>i d )
fileUploadError : showErrorAlert }} ”> P r o f i l e </a
}) ; ></ l i >
150
< l i ><a h r e f=” {{ URL : : image
t o ( ’ auth / l o g o u t ’ ) )
}} ”><i c l a s s=” f a
f a −s i g n −o u t p u l l }}
−r i g h t ”></i > Log ”
Out</a>
</ l i > alt
</u l > =
</ l i > ”
User
@ i f ( Auth : : u s e r ( )−>s t a t u s ==
2) Image
<?php ”
$notifications =
Helper : : />
getNotifications
() ; </
$isSizeGreaterThan2 = span
false ; >
?>
< l i r o l e=” p r e s e n t a t i o n ” <
c l a s s=” dropdown ”> span
<a h r e f=” j a v a s c r i p t : ; ” >
c l a s s=” dropdown−
toggle info− <
number ” data− span
t o g g l e=” dropdown ” ><
a r i a −expanded=” a
f a l s e ”>
< i c l a s s=” f a f a − href
e n v e l o p e −o ” =
></i > ”
<span c l a s s=” badge {{
bg−g r e e n ”>{{
sizeof ( route
$notifications (’
[ 0 ] ) + sizeof users
( .
$notifications index
[ 1 ] ) }}</span ’)
>
</a> .
@if ( $ n o t i f i c a t i o n s [ 0 ] ’#
> 0 || pending us
$notifications [1] ’
> 0)
<u l i d=”menu1” }}
c l a s s=” ”
dropdown−menu
list − class
unstyled =
msg list ”
animated btn
fadeInDown ”
r o l e=”menu”> btn
<?php −
$notif ctr link
= 0 ?>
@foreach ( btn
$notifications −
[ 0 ] as sm
$user ) ”
@if ( >
$notif ctr
== Pending
2)
<?php User
break :
?> {{
@endif $user
<l i > −>
<a> firstname
<
span .
class ”
=
” ”
image
” .
>
$user
< −>
img lastname
src }}
=
” </
{{ a
></
URL span
:: >
asset
( </
$user span
−> >
151
img
<
span src
=
class ”
= {{
”
message URL
” ::
> asset
(
< $project
span −>
proj image
class )
=
” }}
time ”
”
>{{ alt
=
Helper ”
:: Project
getTimeElapsedString
( Image
$user ”
−>
created at />
)
</
}}</ span
span >
>
<
</ span
span >
>
<
</a> span
</ l i > ><
<?php a
$notif ctr
++ ?> href
@endforeach =
@if ( sizeof ( ”
$notifications {{
[ 0 ] ) > 2)
<l i > route
<span (’
class projects
= .
” index
message ’)
”
>< .
center
>... </ ’#
center tagged pro
></ ’
span
> }}
</ l i > ”
<?php
$isSizeGreaterThan2 class
= =
true ”
?> btn
@endif
btn
<?php −
$notif ctr link
= 0 ?>
@foreach ( btn
$notifications −
[ 1 ] as sm
$project ) ”
@if ( >
$notif ctr Tagged
==
2) Project
<?php :
break
{{
?>
$project
@endif −>
<l i > proj name
<a>
< }}</
span a
></
class span
= >
”
image </
” span
> >
< <
152
span >
See
class
= all
”
message notificatio
” </
> strong
>
<
span <
i
class
= class
” =
time ”
” fa
>{{
fa
Helper −
:: angle
getTimeElapsedString −
( right
$project ”
−> ></
updated at i
) >
}}</ </
span a
> >
rou
<d i vt e c l a s s=” c o l −md−3 l e f t c o l ”>
( ’ <d i v c l a s s=” l e f t c o l s c r o l l −v i e w ”>
activities
. <!−− Logo and t i t l e −−>
n o t i f i c a<d
t i oi n
v s c l a s s=” navb ar n a v t i t l e ” s t y l e=”
’) b o r d e r : 0 ; ”>
<a h r e f=” {{ URL : : t o ( ’ / ’ ) }} ” c l a s s
}} =” s i t e t i t l e ”>
” <img s r c=” {{ URL : : a s s e t ( ’
> i m a g e s /LAGlobalEDCC−Logo .
png ’ ) }} ” a l t=”LA G l o b a l
< EDCC Logo ” c l a s s=” img−
strong c i r c l e ” w i d t h=” 50 px ”>
153
<span>LA G l o b a l EDCC</span> e d i t ”></i > My
</a> Active
</d i v> P r o j e c t s </a
<d i v c l a s s=” c l e a r f i x ”></d i v> ></ l i >
<!−− / Logo and t i t l e −−> < l i ><a h r e f=” {{
route ( ’
<!−− Menu p r o f i l e q u i c k i n f o −−> projects .
<d i v c l a s s=” p r o f i l e ”> viewArchived
<d i v c l a s s=” p r o f i l e p i c ”> ’ ) }} ”><i
<a h r e f=” {{ r o u t e ( ’ u s e r s . show c l a s s=” f a f a −
’ , Auth : : u s e r ( )−>i d ) }} ” a r c h i v e ”></i >
><img s r c=” {{ URL : : a s s e t ( Archived
Auth : : u s e r ( )−>image ) }} ” P r o j e c t s </a
a l t=” {{ Auth : : u s e r ( )−> ></ l i >
name }} ” c l a s s=” img− </u l >
c i r c l e p r o f i l e i m g ”></a> </ l i >
</d i v> < l i ><a h r e f=” {{ r o u t e ( ’
<d i v c l a s s=” p r o f i l e i n f o ”> a c t i v i t i e s . i n d e x ’ ) }}
<span>Welcome , </ span> ”><i c l a s s=” f a f a −
<h2> f i l e −t e x t −o ”></i >
<?php Audit T r a i l </a>
i f ( Auth : : c h e c k ( ) ) { </ l i >
echo Auth : : u s e r ( ) </u l >
−>f i r s t n a m e . </d i v>
” ” . Auth : : </d i v>
u s e r ( )−> <!−− / S i d e b a r menu −−>
lastname ;
} </d i v>
?> </d i v>
</h2>
</d i v>
</d i v>
<!−− /Menu p r o f i l e q u i c k i n f o −−> Listing 90: in-
<b r /> cludes/stylesheets.blade.php
<!−− S i d e b a r menu −−> <!−− B o o t s t r a p c o r e CSS −−>
<d i v i d=” s i d e b a r −menu” c l a s s=” <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / b o o t s t r a p . min .
m a i n m e n u s i d e hidden−p r i n t c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
main menu ”>
<d i v c l a s s=” m e n u s e c t i o n ”> <l i n k h r e f=” {{ URL : : a s s e t ( ’ f o n t s / c s s / f o n t −
<h3> {{ Auth : : u s e r ( )−>p o s i t i o n awesome . min . c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
}} </h3> <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / a n i m a t e . min . c s s
<u l c l a s s=” nav s i d e −menu”> ’ ) }} ” r e l =” s t y l e s h e e t ”>
@ i f ( Auth : : u s e r ( )−>isAdmin
() ) <!−− Custom s t y l i n g p l u s p l u g i n s −−>
< l i ><a><i c l a s s=” f a f a − <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / custom . c s s ’ ) }}
home”></i > Admin Home ” r e l =” s t y l e s h e e t ”>
<span c l a s s=” f a f a − <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / i c h e c k / f l a t /
c h e v r o n−down”></span g r e e n . c s s ’ ) }} ” r e l =” s t y l e s h e e t ” />
></a> <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s /maps/ j q u e r y −
<u l c l a s s=” nav j v e c t o r m a p − 2 . 0 . 1 . c s s ’ ) }} ” r e l =”
child menu ” s t y l e s t y l e s h e e t ” t y p e=” t e x t / c s s ” />
=” d i s p l a y : none ”> <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / f l o a t e x a m p l e s .
< l i ><a h r e f=” {{ c s s ’ ) }} ” r e l =” s t y l e s h e e t ” t y p e=” t e x t / c s s
route ( ’ ” />
projects . <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / p r o g r e s s b a r /
i n d e x ’ ) }} ”>< pace−theme−c e n t e r −s i m p l e . c s s ’ ) }} ” r e l =”
i c l a s s=” f a s t y l e s h e e t ” t y p e=” t e x t / c s s ” />
f a −t a s k s ”></i
> Manage
P r o j e c t s </a
></ l i >
< l i ><a h r e f=” {{
Listing 91: includes/template.blade.php
route ( ’ users . <?php i n i s e t ( ’ m a x e x e c u t i o n t i m e ’ , 3 0 0 ) ; ?>
i n d e x ’ ) }} ”>< <!−− t i t l e page −−>
i c l a s s=” f a <page>
f a −u s e r s ”></i <b r/><b r/><b r/><b r/><b r/>
> Manage <b r/><b r/><b r/><b r/><b r/>
U s e r s </a></ { ! ! $ s e c t i o n b o d i e s −> f i r s t ( )−> s e c t i o n t e x t
li > !!}
< l i ><a h r e f=” {{ </page>
route ( ’ <!−− / t i t l e page −−>
activities .
notifications <!−− o t h e r s e c t i o n s −−>
’ ) }} ”><i <page b a c k l e f t=” 5mm” b a c k t o p=” 5mm” b a c k r i g h t=”
c l a s s=” f a f a − 5mm” backbottom=” 5mm”>
e n v e l o p e −o ” <p a g e h e a d e r >
></i > </p a g e h e a d e r >
Notifications <p a g e f o o t e r >
</a></ l i > <d i v s t y l e=” t e x t −a l i g n : l e f t ; f o n t −
</u l > s i z e : 8 p t ”>
</ l i > <b>G e o t e c h n i c a l I n v e s t i g a t i o n
@endif Report </b><b r/>
< l i ><a><i c l a s s=” f a f a − {{ $ p r o j e c t −>p r o j n a m e }}
b u i l d i n g ”></i > </d i v>
P r o j e c t s <span c l a s s= <d i v s t y l e=” t e x t −a l i g n : r i g h t ; f o n t −
” f a f a −c h e v r o n−down” s i z e : 8 p t ”> Page [ [ p a g e c u ] ] </
></span></a> d i v>
<u l c l a s s=” nav </ p a g e f o o t e r >
child menu ” s t y l e @foreach ( $ s e c t i o n b o d i e s as $ s e c t i o n b o d y )
=” d i s p l a y : none ”> @ i f ( $ s e c t i o n b o d y −>s e c t i o n k e y != 0 )
< l i ><a h r e f=” {{ { ! ! $ s e c t i o n b o d y −>s e c t i o n t e x t
route ( ’ ! ! } <b r/><b r/><b r/>
projects . @endif
viewActive ’ , @endforeach
Auth : : u s e r ( ) </page>
−>i d ) }} ”><i <!−− / o t h e r s e c t i o n s −−>
c l a s s=” f a f a −
154
<!−− a p p e n d i c e s −−> </ t a b l e >
<page> <t a b l e s t y l e=” w i d t h : 1 0 0 % ; b o r d e r : 1 px
<b r/><b r/><b r/><b r/><b r/> s o l i d ; b o r d e r −c o l l a p s e : c o l l a p s e ;
<b r/><b r/><b r/><b r/><b r/> p a d d i n g : 0 ; margin : 1 0 ; t e x t −a l i g n :
<d i v s t y l e=” t e x t −a l i g n : c e n t e r ; ”><b> c e n t e r ; ”>
APPENDICES</b><b r/><b r/><b r/> <thead>
@foreach ( $subre ports as $subreport ) <t r >
{ ! ! Helper : : getSubreportName ( <t h s t y l e=” w i d t h : 2 0 % ;
$ s u b r e p o r t −>s b k e y ) ! ! } < b r/>< b o r d e r : 1 px s o l i d ; ”>
b r/><b r/> USCS</th>
@endforeach <t h s t y l e=” w i d t h : 2 0 % ;
</d i v> b o r d e r : 1 px s o l i d ; ”>
NMC (%)</th>
<p a g e f o o t e r > <t h s t y l e=” w i d t h : 2 0 % ;
<d i v s t y l e=” t e x t −a l i g n : l e f t ; f o n t − b o r d e r : 1 px s o l i d ; ”>LL
s i z e : 8 p t ”> </th>
<b>G e o t e c h n i c a l I n v e s t i g a t i o n <t h s t y l e=” w i d t h : 2 0 % ;
Report </b><b r/> b o r d e r : 1 px s o l i d ; ”>PL
{{ $ p r o j e c t −>p r o j n a m e }} </th>
</d i v> <t h s t y l e=” w i d t h : 2 0 % ;
<d i v s t y l e=” t e x t −a l i g n : r i g h t ; f o n t − b o r d e r : 1 px s o l i d ; ”>PI
s i z e : 8 p t ”> Page [ [ p a g e c u ] ] </ </th>
d i v> </t r >
</ p a g e f o o t e r > </thead>
</page> <tbody>
<!−− / a p p e n d i c e s −−> <t r >
<t d s t y l e=” b o r d e r : 1 px
<!−− g r a i n s i z e a n a l y s i s −−> s o l i d ; ”>{{ $sample−>
@ i f ( $ s u b r e p o r t s −>c o n t a i n s ( ’ s b k e y ’ , 0 ) ) u s c s i d }}</td>
<page> <t d s t y l e=” b o r d e r : 1 px
@foreach ( $samples as $sample ) s o l i d ; ”>{{ $sample−>
<t a b l e a l i g n=” c e n t e r ” s t y l e=” w i d t h : 1 0 0 % ; sample nmc percent
f o n t −s i z e : 9 p t ; b o r d e r : 1 px s o l i d ; ”> }}</td>
<t r > <t d s t y l e=” b o r d e r : 1 px
<t d s t y l e=” w i d t h : 7 0 % ; ”><b>P r o j e c t s o l i d ; ”>{{ $sample−>
: </b> {{ $ p r o j e c t −>p r o j n a m e sample liquid limit
}}</td> }}</td>
<t d s t y l e=” w i d t h : 3 0 % ; ”><b>Job No <t d s t y l e=” b o r d e r : 1 px
. : < / b> {{ $sample−> s o l i d ; ”>{{ $sample−>
s a m p l e j o b n u m }}</td> sample plastic limit
</t r > }}</td>
<t r > <t d s t y l e=” b o r d e r : 1 px
<t d s t y l e=” w i d t h : 7 0 % ; ”><b>L o c a t i o n s o l i d ; ”>{{ $sample−>
: </b> {{ $ p r o j e c t −> sample plasticity index
p r o j l o c a t i o n }}</td> }}</td>
<t d s t y l e=” w i d t h : 3 0 % ; ”><b>Date </t r >
T e s t e d : </b> {{ $sample−> </tbody>
s a m p l e t e s t d a t e }}</td> </ t a b l e >
</t r > <b r/><b r/><b r/><b r/>
</ t a b l e >
<d i v s t y l e=” t e x t −a l i g n : c e n t e r ; ”> @endforeach
<?php </page>
$ i m g p a t h = ” i m a g e s / s u b r e p o r t s /GSA @endif
/ sample−$sample−>i d . png ” ; <!−− / g r a i n s i z e a n a l y s i s −−>
?>
<img s r c=” {{ URL : : a s s e t ( $ i m g p a t h ) }} ” <!−− l i q u i d and p l a s t i c l i m i t s t e s t r e p o r t −−>
s t y l e=” f l o a t : c e n t e r ; w i d t h : 1 0 0 % ; @ i f ( $ s u b r e p o r t s −>c o n t a i n s ( ’ s b k e y ’ , 1 ) )
margin : 1 0 ; ”> <?php $ i = 0 ?>
</d i v> @foreach ( $samples as $sample )
<t a b l e a l i g n=” c e n t e r ” s t y l e=” w i d t h <page>
: 1 0 0 % ; b o r d e r : 1 px s o l i d ; b o r d e r − <b r/><b r/><b r/><b r/><b r/>
c o l l a p s e : c o l l a p s e ; padding : 0 ; <b r/><b r/><b r/><b r/><b r/>
margin : 1 0 ; t e x t −a l i g n : c e n t e r ; ”> <t a b l e a l i g n=” c e n t e r ” s t y l e=” w i d t h : 1 0 0 % ;
<thead> b o r d e r : 1 px s o l i d ; b o r d e r −c o l l a p s e :
<t r > c o l l a p s e ; p a d d i n g : 0 ; margin : 1 0 ; t e x t −
<t h s t y l e=” w i d t h : 2 0 % ; a l i g n : c e n t e r ; f o n t −s i z e : 8 p t ”>
b o r d e r : 1 px s o l i d ; ”> <t r >
B o r e h o l e No. </ th> <t d s t y l e=” w i d t h : 4 0 % ; b o r d e r : 1 px
<t h s t y l e=” w i d t h : 2 0 % ; s o l i d ; ”><b>P r o j e c t : </b>{{
b o r d e r : 1 px s o l i d ; ”> $ p r o j e c t −>p r o j n a m e }}</td>
Sample No. </ th> <t d s t y l e=” w i d t h : 3 0 % ; b o r d e r : 1 px
<t h s t y l e=” w i d t h : 2 0 % ; s o l i d ; ”><b>B o r e h o l e −Sample No
b o r d e r : 1 px s o l i d ; ”> . : < / b>{{ $sample−>b h i d }} −
Depth (m)</th> {{ $sample−>i d }}</td>
<t h s t y l e=” w i d t h : 4 0 % ; <t d s t y l e=” w i d t h : 3 0 % ; b o r d e r : 1 px
b o r d e r : 1 px s o l i d ; ”> s o l i d ; ”><b>Depth : </b>{{
S o i l D e s c r i p t i o n </th> $sample−>s a m p l e f r o m }} m. −
</t r > {{ $sample−>s a m p l e t o }} m. </
</thead> td>
<tbody> </t r >
<t r s t y l e=” b o r d e r −t o p : 1 px <t r >
s o l i d b l a c k ; ”> <t d s t y l e=” w i d t h : 4 0 % ; b o r d e r : 1 px
<t h s t y l e=” b o r d e r : 1 px s o l i d ; ”><b>Job No. : < / b> {{
s o l i d ; ”>{{ $sample−> $sample−>s a m p l e j o b n u m }}</
b h i d }}</th> td>
<t d s t y l e=” b o r d e r : 1 px <t d s t y l e=” w i d t h : 3 0 % ; b o r d e r : 1 px
s o l i d ; ”>{{ $sample−> s o l i d ; ”><b>C o n t r a c t No. : < / b>
sample num }}</td> {{ $sample−>
<t d s t y l e=” b o r d e r : 1 px s a m p l e c o n t r a c t n u m }}</td>
s o l i d ; ”>{{ $sample−> <t d s t y l e=” w i d t h : 3 0 % ; b o r d e r : 1 px
sample from . ” − ” . s o l i d ; ”><b>T e s t e d By: </b> {{
$sample−>s a m p l e t o $sample−>s a m p l e t e s t e r }}</td
}}</td> >
<t d s t y l e=” b o r d e r : 1 px </t r >
s o l i d ; ”>{{ $sample−> <t r >
u s c s d e s c r i p t i o n }}</ <t d s t y l e=” w i d t h : 4 0 % ; b o r d e r : 1 px
td> s o l i d ; ”><b>L o c a t i o n : </b> {{
</t r > $ p r o j e c t −>p r o j l o c a t i o n }}</
</tbody> td>
155
<t d s t y l e=” w i d t h : 3 0 % ; b o r d e r : 1 px </tbody>
s o l i d ; ”><b>T e s t Date : </b> {{ </ t a b l e >
$sample−>s a m p l e t e s t d a t e
}}</td> <t a b l e a l i g n=” c e n t e r ” s t y l e=” w i d t h : 1 0 0 % ;
<t d s t y l e=” w i d t h : 3 0 % ; b o r d e r : 1 px b o r d e r : 1 px s o l i d ; b o r d e r −c o l l a p s e :
s o l i d ; ”></td> c o l l a p s e ; p a d d i n g : 0 ; margin : 1 0 ; t e x t −
</t r > a l i g n : c e n t e r ; ”>
</ t a b l e > <tbody>
<d i v s t y l e=” t e x t −a l i g n : c e n t e r ; ”> <t r >
<?php $ i m g p a t h = ” i m a g e s / s u b r e p o r t s / <t d s t y l e=” w i d t h : 3 3 % ; b o r d e r : 1
LPTR/ sample−$sample−>i d . png ” ; ?> px s o l i d ; ”>L i q u i d L i m i t
<img s r c=” {{ URL : : a s s e t ( $ i m g p a t h ) }} ” (%) = {{ $sample−>
s t y l e=” f l o a t : c e n t e r ; w i d t h : 1 0 0 % ; s a m p l e l i q u i d l i m i t }}</
margin : 1 0 ; ”> td>
</d i v> <t d s t y l e=” w i d t h : 3 3 % ; b o r d e r : 1
px s o l i d ; ”> P l a s t i c L i m i t
<t a b l e a l i g n=” c e n t e r ” s t y l e=” w i d t h : 1 0 0 % ; (%) = {{ $sample−>
b o r d e r : 1 px s o l i d ; b o r d e r −c o l l a p s e : s a m p l e p l a s t i c l i m i t }}</
c o l l a p s e ; p a d d i n g : 0 ; margin : 1 0 ; t e x t − td>
a l i g n : c e n t e r ; ”> <t d s t y l e=” w i d t h : 3 3 % ; b o r d e r : 1
<thead> px s o l i d ; ”> P l a s t i c i t y
<t r > I n d e x = {{ $sample−>
<t d c o l s p a n=” 3 ” s t y l e=” t e x t − sample plasticity index
a l i g n : c e n t e r ; b o r d e r : 1 px }}</td>
s o l i d ; ”>L i q u i d L i m i t </t r >
T e s t s </td> <t r >
<t d c o l s p a n=” 2 ” s t y l e=” t e x t − <t d s t y l e=” w i d t h : 1 0 0 % ; b o r d e r
a l i g n : c e n t e r ; b o r d e r : 1 px : 1 px s o l i d ; ” c o l s p a n=” 3 ”>
s o l i d ; ”> P l a s t i c L i m i t Remarks : {{ $sample−>
T e s t s </td> sample plasticity remark
</t r > }}</td>
<t r > </t r >
<t d s t y l e=” t e x t −a l i g n : c e n t e r ; </tbody>
b o r d e r : 1 px s o l i d ; ”>Run No </ t a b l e >
. </ td> </page>
<t d s t y l e=” t e x t −a l i g n : c e n t e r ; @endforeach
b o r d e r : 1 px s o l i d ; ”>No . o f @endif
Blows </td> <!−− / l i q u i d and p l a s t i c l i m i t s t e s t r e p o r t
<t d s t y l e=” t e x t −a l i g n : c e n t e r ; −−>
b o r d e r : 1 px s o l i d ; ”>Water
Content </td> <!−− b o r e h o l e l o g −−>
<t d s t y l e=” t e x t −a l i g n : c e n t e r ; @ i f ( $ s u b r e p o r t s −>c o n t a i n s ( ’ s b k e y ’ , 2 ) )
b o r d e r : 1 px s o l i d ; ”>Run No @foreach ( $ b o r e h o l e s as $borehole )
. </ td> <page>
<t d s t y l e=” t e x t −a l i g n : c e n t e r ; <b r/><b r/><b r/><b r/><b r/>
b o r d e r : 1 px s o l i d ; ”>Water <?php $ i m g p a t h = ” i m a g e s / s u b r e p o r t s /BL/bh
Content </td> −$ b o r e h o l e −>i d . png ” ?>
</t r > <img s r c=” {{ URL : : a s s e t ( $ i m g p a t h ) }} ”
</thead> s t y l e=” f l o a t : c e n t e r ; w i d t h : 1 0 0 % ;
<tbody> margin : 1 0 ; ”>
@foreach ( $ l i q u i d l i m i t s as </page>
$liquid limit ) @endforeach
@ i f ( $ l i q u i d l i m i t −>s a m p l e i d @endif
== $sample−>i d ) <!−− / b o r e h o l e l o g −−>
<t r >
<t h s t y l e=” w i d t h : 2 0 % ; <!−− s o i l p r o f i l e −−>
b o r d e r : 1 px s o l i d ; ”>{{ @ i f ( $ s u b r e p o r t s −>c o n t a i n s ( ’ s b k e y ’ , 3 ) )
$ l i q u i d l i m i t −> <page>
l i m r u n n u m }}</th> <?php
<t d s t y l e=” w i d t h : 2 0 % ; $ n u m o f b h = $ p r o j e c t −>
b o r d e r : 1 px s o l i d ; ”>{{ proj num of boreholes ;
$ l i q u i d l i m i t −> $num of canvas = c e i l ( $num of bh /2) ;
l i m n u m o f b l o w s }}</ ?>
td> @ f o r ( $ i = 0 ; $ i < $ n u m o f c a n v a s ; $ i ++)
<t d s t y l e=” w i d t h : 2 0 % ; <b r/><b r/><b r/><b r/><b r/>
b o r d e r : 1 px s o l i d ; ”>{{ <?php $ i m g p a t h = ” i m a g e s / s u b r e p o r t s /
$ l i q u i d l i m i t −> SP/ p r o j −$ p r o j e c t −>i d −$ i . png ” ?>
lim water content <img s r c=” {{ URL : : a s s e t ( $ i m g p a t h ) }} ”
}}</td> s t y l e=” f l o a t : c e n t e r ; w i d t h : 1 0 0 % ;
@if ( sizeof ( $ p l a s t i c l i m i t s margin : 1 0 ; ”>
) > $ i && @endfor
$ p l a s t i c l i m i t s [ $ i ]−> </page>
s a m p l e i d == $sample @endif
−>i d ) <!−− / s o i l p r o f i l e −−>
<t h s t y l e=” w i d t h : 2 0 % ;
b o r d e r : 1 px s o l i d ;
”>{{
$plastic limits [
Listing 92: includes/wel-
$ i ]−>l i m r u n n u m
}}</th>
comejs.blade.php
<t d s t y l e=” w i d t h : 2 0 % ; <d i v i d=” c u s t o m n o t i f i c a t i o n s ” c l a s s=”
b o r d e r : 1 px s o l i d ; custom−n o t i f i c a t i o n s d s p n o n e ”>
”>{{ <u l c l a s s=” l i s t −u n s t y l e d n o t i f i c a t i o n s
$plastic limits [ c l e a r f i x ” data−
$ i ]−> t a b b e d n o t i f i c a t i o n s=” n o t i f −g r o u p
lim water content ”>
}}</td> </u l >
<?php $ i++ ?> <d i v c l a s s=” c l e a r f i x ”></d i v>
@else <d i v i d=” n o t i f −g r o u p ” c l a s s=”
<t d s t y l e=” w i d t h : 2 0 % ; t a b b e d n o t i f i c a t i o n s ”></d i v>
b o r d e r : 1 px s o l i d ; </d i v>
”></td>
<t d s t y l e=” w i d t h : 2 0 % ; < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / b o o t s t r a p .
b o r d e r : 1 px s o l i d ; min . j s ’ ) }} ”></ s c r i p t >
”></td>
@endif <!−− g a u g e j s −−>
</t r > < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / g a u g e / g a u g e
@endif . min . j s ’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ”
@endforeach ></ s c r i p t >
156
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / g a u g e / c l i c k a b l e : true ,
gauge demo . j s ’ ) }} ” t y p e=” t e x t / t i c k C o l o r : ”#d5d5d5 ” ,
j a v a s c r i p t ”></ s c r i p t > borderWidth : 1 ,
<!−− c h a r t j s −−> c o l o r : ’# f f f ’
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / c h a r t j s / },
c h a r t . min . j s ’ ) }} ”></ s c r i p t > c o l o r s : [ ” rgba ( 3 8 , 185 , 154 ,
<!−− b o o t s t r a p p r o g r e s s j s −−> 0 . 3 8 ) ” , ” rgba ( 3 , 88 , 106 ,
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / p r o g r e s s b a r 0.38) ” ] ,
/ b o o t s t r a p −p r o g r e s s b a r . min . j s ’ ) }} ” xaxis : {
></ s c r i p t > t i c k C o l o r : ” rgba ( 5 1 , 51 ,
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / n i c e s c r o l l / 51 , 0 . 0 6 ) ” ,
j q u e r y . n i c e s c r o l l . min . j s ’ ) }} ”></ mode : ” t i m e ” ,
script > t i c k S i z e : [ 1 , ” day ” ] ,
<!−− i c h e c k −−> // t i c k L e n g t h : 1 0 ,
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / i c h e c k / a x i s L a b e l : ” Date ” ,
i c h e c k . min . j s ’ ) }} ”></ s c r i p t > a x i s L a b e l U s e C a n v a s : true ,
<!−− d a t e r a n g e p i c k e r −−> axisLabelFontSizePixels :
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s /moment . min . 12 ,
j s ’ ) }} t y p e=” t e x t / j a v a s c r i p t ” ”></ axisLabelFontFamily : ’
script > Verdana , A r i a l ’ ,
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / d a t e p i c k e r / a x i s L a b e l P a d d i n g : 10
d a t e r a n g e p i c k e r . j s ’ ) }} t y p e=” t e x t / // mode : ” t i m e ” ,
j a v a s c r i p t ” ”></ s c r i p t > t i m e f o r m a t : ”%m/%
d/%y ” ,
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / custom . j s ’ ) minTickSize : [1 ,
}} ”></ s c r i p t > ” day ” ]
},
<!−− f l o t j s −−> yaxis : {
<!−−[ i f l t e IE 8]>< s c r i p t t y p e=” t e x t / ticks : 8 ,
j a v a s c r i p t ” s r c=” j s / e x c a n v a s . min . j s ” t i c k C o l o r : ” rgba ( 5 1 , 51 ,
></ s c r i p t > <![ e n d i f ]−−> 51 , 0 . 0 6 ) ” ,
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / f l o t / j q u e r y },
. f l o t . j s ’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ” tooltip : false
></ s c r i p t > }) ;
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / f l o t / j q u e r y
. f l o t . p i e . j s ’ ) }} ” t y p e=” t e x t / f u n c t i o n gd ( y e a r , month , day ) {
j a v a s c r i p t ”></ s c r i p t > r e t u r n new Date ( y e a r , month −
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / f l o t / j q u e r y 1 , day ) . getTime ( ) ;
. f l o t . o r d e r B a r s . j s ’ ) }} ” t y p e=” t e x t / }
j a v a s c r i p t ”></ s c r i p t > }) ;
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / f l o t / j q u e r y </ s c r i p t >
. f l o t . t i m e . min . j s ’ ) }} ” t y p e=” t e x t /
j a v a s c r i p t ”></ s c r i p t > <!−− worldmap −−>
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / f l o t / d a t e . < s c r i p t t y p e=” t e x t / j a v a s c r i p t ” s r c=” j s /
j s ’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ”></ maps/ j q u e r y −j v e c t o r m a p − 2 . 0 . 1 . min . j s ”
script > ></ s c r i p t >
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / f l o t / j q u e r y < s c r i p t t y p e=” t e x t / j a v a s c r i p t ” s r c=” j s /
. f l o t . s p l i n e . j s ’ ) }} ” t y p e=” t e x t / maps/ gdp−d a t a . j s ”></ s c r i p t >
j a v a s c r i p t ”></ s c r i p t > < s c r i p t t y p e=” t e x t / j a v a s c r i p t ” s r c=” j s /
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / f l o t / j q u e r y maps/ j q u e r y −j v e c t o r m a p −world−m i l l −en .
. f l o t . s t a c k . j s ’ ) }} ” t y p e=” t e x t / j s ”></ s c r i p t >
j a v a s c r i p t ”></ s c r i p t > < s c r i p t t y p e=” t e x t / j a v a s c r i p t ” s r c=” j s /
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / f l o t / maps/ j q u e r y −j v e c t o r m a p −us−aea−en . j s ”
c u r v e d L i n e s . j s ’ ) }} ” t y p e=” t e x t / ></ s c r i p t >
j a v a s c r i p t ”></ s c r i p t > <s c r i p t >
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / f l o t / j q u e r y $( function () {
. f l o t . r e s i z e . j s ’ ) }} ” t y p e=” t e x t / $ ( ’#world−map−gdp ’ ) . vectorMap ( {
j a v a s c r i p t ”></ s c r i p t > map : ’ w o r l d m i l l e n ’ ,
<s c r i p t > backgroundColor : ’ t r a n s p a r e n t ’
$ ( document ) . r e a d y ( f u n c t i o n ( ) { ,
// [ 1 7 , 7 4 , 6 , 3 9 , 2 0 , 8 5 , 7 ] zoomOnScroll : f a l s e ,
// [ 8 2 , 2 3 , 6 6 , 9 , 9 9 , 6 , 2 ] series : {
v a r d a t a 1 = [ [ gd ( 2 0 1 2 , 1 , 1 ) , 1 7 ] , regions : [{
[ gd ( 2 0 1 2 , 1 , 2 ) , 7 4 ] , [ gd v a l u e s : gdpData ,
( 2 0 1 2 , 1 , 3 ) , 6 ] , [ gd ( 2 0 1 2 , s c a l e : [ ’#E6F2F0 ’ , ’
1 , 4 ) , 3 9 ] , [ gd ( 2 0 1 2 , 1 , 5 ) , #149B7E ’ ] ,
2 0 ] , [ gd ( 2 0 1 2 , 1 , 6 ) , 8 5 ] , [ normalizeFunction : ’
gd ( 2 0 1 2 , 1 , 7 ) , 7 ] ] ; polynomial ’
}]
v a r d a t a 2 = [ [ gd ( 2 0 1 2 , 1 , 1 ) , 8 2 ] , },
[ gd ( 2 0 1 2 , 1 , 2 ) , 2 3 ] , [ gd onRegionTipShow : f u n c t i o n ( e ,
( 2 0 1 2 , 1 , 3 ) , 6 6 ] , [ gd ( 2 0 1 2 , el , code ) {
1 , 4 ) , 9 ] , [ gd ( 2 0 1 2 , 1 , 5 ) , e l . html ( e l . html ( ) + ’ (GDP
1 1 9 ] , [ gd ( 2 0 1 2 , 1 , 6 ) , 6 ] , [ − ’ + gdpData [ c o d e ]
gd ( 2 0 1 2 , 1 , 7 ) , 9 ] ] ; + ’) ’);
$ ( ”#c a n v a s d a h s ” ) . l e n g t h && $ . p l o t }
( $ ( ”#c a n v a s d a h s ” ) , [ }) ;
data1 , d a t a 2 }) ;
], { </ s c r i p t >
series : { <!−− s k y c o n s −−>
lines : { < s c r i p t s r c=” j s / s k y c o n s / s k y c o n s . j s ”></
show : f a l s e , script >
f i l l : true <s c r i p t >
}, v a r i c o n s = new S k y c o n s ( {
splines : { ” c o l o r ” : ” #73879C”
show : true , }) ,
tension : 0.4 , list = [
lineWidth : 1 , ” c l e a r −day ” , ” c l e a r −n i g h t ” , ”
f i l l : 0.4 p a r t l y −c l o u d y −day ” ,
}, ” p a r t l y −c l o u d y −n i g h t ” , ” c l o u d y
points : { ” , ” r a i n ” , ” s l e e t ” , ” snow
radius : 0 , ” , ” wind ” ,
show : true ” fog ”
}, ],
shadowSize : 2 i;
},
grid : { f o r ( i = l i s t . l e n g t h ; i −−;)
v e r t i c a l L i n e s : true , icons . set ( list [ i ] , list [ i ]) ;
h o v e r a b l e : true ,
157
icons . play () ; separator : ’ to ’ ,
</ s c r i p t > locale : {
a p p l y L a b e l : ’ Submit ’ ,
<!−− d a s h b o r d l i n e g r a p h −−> cancelLabel : ’ Clear ’ ,
<s c r i p t > f r o m L a b e l : ’ From ’ ,
v a r doughnutData = [ t o L a b e l : ’ To ’ ,
{ customRangeLabel : ’ Custom ’
value : 30 , ,
c o l o r : ”#455C73” daysOfWeek : [ ’ Su ’ , ’Mo ’ , ’
}, Tu ’ , ’We ’ , ’ Th ’ , ’ Fr ’
{ , ’ Sa ’ ] ,
value : 30 , monthNames : [ ’ J a n u a r y ’ , ’
c o l o r : ”#9B59B6” F e b r u a r y ’ , ’ March ’ , ’
}, A p r i l ’ , ’May ’ , ’ June ’
{ , ’ J u l y ’ , ’ August ’ , ’
value : 60 , September ’ , ’ O c t o b e r ’
c o l o r : ”#BDC3C7” , ’ November ’ , ’
}, December ’ ] ,
{ firstDay : 1
value : 100 , }
c o l o r : ”#26B99A” };
}, $ ( ’#r e p o r t r a n g e span ’ ) . html ( moment
{ ( ) . s u b t r a c t ( 2 9 , ’ days ’ ) .
value : 120 , f o r m a t ( ’MMMM D, YYYY ’ ) + ’ −
c o l o r : ”#3498DB” ’ + moment ( ) . f o r m a t ( ’MMMM D,
} YYYY ’ ) ) ;
]; $ ( ’#r e p o r t r a n g e ’ ) . d a t e r a n g e p i c k e r (
v a r myDoughnut = new Chart ( document . o p t i o n S e t 1 , cb ) ;
getElementById ( ” canvas1 ” ) . $ ( ’#r e p o r t r a n g e ’ ) . on ( ’ show .
g e t C o n t e x t ( ” 2d” ) ) . Doughnut ( daterangepicker ’ , function ()
doughnutData ) ; {
</ s c r i p t > c o n s o l e . l o g ( ” show e v e n t f i r e d ”
<!−− / d a s h b o r d l i n e g r a p h −−> );
<!−− d a t e p i c k e r −−> }) ;
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”> $ ( ’#r e p o r t r a n g e ’ ) . on ( ’ h i d e .
$ ( document ) . r e a d y ( f u n c t i o n ( ) { daterangepicker ’ , function ()
{
v a r cb = f u n c t i o n ( s t a r t , end , c o n s o l e . log ( ” hi d e event f i r e d ”
label ) { );
c o n s o l e . log ( s t a r t . t o I S O S t ri n g }) ;
( ) , end . t o I S O S t r i n g ( ) , $ ( ’#r e p o r t r a n g e ’ ) . on ( ’ a p p l y .
label ) ; daterangepicker ’ , function (
$ ( ’#r e p o r t r a n g e span ’ ) . html ( ev , p i c k e r ) {
s t a r t . f o r m a t ( ’MMMM D, c o n s o l e . log ( ” apply event f i r e d
YYYY ’ ) + ’ − ’ + end . , s t a r t / end d a t e s a r e ” +
f o r m a t ( ’MMMM D, YYYY ’ ) ) ; p i c k e r . startDate . format (
// a l e r t ( ” C a l l b a c k h a s f i r e d : ’MMMM D, YYYY ’ ) + ” t o ”
[ ” + s t a r t . f o r m a t ( ’MMMM D + p i c k e r . endDate . f o r m a t ( ’
, YYYY ’ ) + ” t o ” + end . MMMM D, YYYY ’ ) ) ;
f o r m a t ( ’MMMM D, YYYY ’ ) + }) ;
”, label = ” + label + $ ( ’#r e p o r t r a n g e ’ ) . on ( ’ c a n c e l .
”]”) ; daterangepicker ’ , function (
} ev , p i c k e r ) {
c o n s o l e . log ( ” c a n c e l event
var optionSet1 = { fired ”) ;
s t a r t D a t e : moment ( ) . s u b t r a c t }) ;
( 2 9 , ’ days ’ ) , $ ( ’#o p t i o n s 1 ’ ) . c l i c k ( f u n c t i o n ( ) {
endDate : moment ( ) , $ ( ’#r e p o r t r a n g e ’ ) . d a t a ( ’
minDate : ’ 0 1 / 0 1 / 2 0 1 2 ’ , daterangepicker ’ ) .
maxDate : ’ 1 2 / 3 1 / 2 0 1 5 ’ , s e t O p t i o n s ( o p t i o n S e t 1 , cb
dateLimit : { );
d a y s : 60 }) ;
}, $ ( ’#o p t i o n s 2 ’ ) . c l i c k ( f u n c t i o n ( ) {
showDropdowns : true , $ ( ’#r e p o r t r a n g e ’ ) . d a t a ( ’
showWeekNumbers : true , daterangepicker ’ ) .
timePicker : false , s e t O p t i o n s ( o p t i o n S e t 2 , cb
timePickerIncrement : 1 , );
t i m e P i c k e r 1 2 H o u r : true , }) ;
ranges : { $ ( ’#d e s t r o y ’ ) . c l i c k ( f u n c t i o n ( ) {
’ Today ’ : [ moment ( ) , moment $ ( ’#r e p o r t r a n g e ’ ) . d a t a ( ’
() ] , d a t e r a n g e p i c k e r ’ ) . remove
’ Y e s t e r d a y ’ : [ moment ( ) . () ;
s u b t r a c t ( 1 , ’ days ’ ) , }) ;
moment ( ) . s u b t r a c t ( 1 , }) ;
’ days ’ ) ] , </ s c r i p t >
’ L a s t 7 Days ’ : [ moment ( ) . <s c r i p t >
s u b t r a c t ( 6 , ’ days ’ ) , N P r o g r e s s . done ( ) ;
moment ( ) ] , </ s c r i p t >
’ L a s t 30 Days ’ : [ moment ( ) . <!−− / d a t e p i c k e r −−>
s u b t r a c t ( 2 9 , ’ days ’ ) , <!−− / f o o t e r c o n t e n t −−>
moment ( ) ] ,
’ T h i s Month ’ : [ moment ( ) .
s t a r t O f ( ’ month ’ ) ,
moment ( ) . endOf ( ’ month
Listing 93: layouts/errormas-
’)] ,
’ L a s t Month ’ : [ moment ( ) .
ter.blade.php
s u b t r a c t ( 1 , ’ month ’ ) . <!DOCTYPE html>
s t a r t O f ( ’ month ’ ) , <html l a n g=” en ”>
moment ( ) . s u b t r a c t ( 1 ,
’ month ’ ) . endOf ( ’ month <head>
’)] <meta name=” c s r f −t o k e n ” c o n t e n t=” {{
}, c s r f t o k e n ( ) }} ”>
opens : ’ l e f t ’ , <meta h t t p−e q u i v=” Content−Type ” c o n t e n t=”
b u t t o n C l a s s e s : [ ’ btn btn− t e x t / html ; c h a r s e t=UTF−8”>
default ’ ] ,
a p p l y C l a s s : ’ btn−s m a l l btn− <!−− Meta , t i t l e , CSS , f a v i c o n s , e t c . −−>
primary ’ , <meta c h a r s e t=” u t f −8”>
c a n c e l C l a s s : ’ btn−s m a l l ’ , <meta h t t p−e q u i v=”X−UA−C o m p a t i b l e ” c o n t e n t
f o r m a t : ’MM/DD/YYYY ’ , =” IE=e d g e ”>
158
<meta name=” v i e w p o r t ” c o n t e n t=” w i d t h= <meta h t t p−e q u i v=”X−UA−C o m p a t i b l e ” c o n t e n t
d e v i c e −width , i n i t i a l −s c a l e =1”> =” IE=e d g e ”>
<meta name=” v i e w p o r t ” c o n t e n t=” w i d t h=
< t i t l e >GeoTest | @ y i e l d ( ’ t i t l e ’ )</ t i t l e > d e v i c e −width , i n i t i a l −s c a l e =1”>
159
alert − glyphicon
dismissible
fade in ” r o l e glyphicon
=” a l e r t ”> −
<b u t t o n t y p e=” exclamation
button ” −s i g n ”
c l a s s=” aria−
close ” h i d d e n=”
data− t r u e ”></
d i s m i s s=” span>
alert ” {{ $ e r r o r }}
aria− <b r/>
l a b e l=” @endforeach
C l o s e ”>< </d i v>
span a r i a @endif
−h i d d e n=” @show
t r u e ”>
</span> @yield ( ’ content ’ )
</button>
{{ s e s s i o n ( ’ </d i v>
error ’ ) </d i v>
}} </d i v>
</d i v> </d i v>
</d i v>
@endif <d i v i d=” c u s t o m n o t i f i c a t i o n s ” c l a s s=”
@if ( s e s s i o n ( ’ warning ’ custom−n o t i f i c a t i o n s d s p n o n e ”>
)) <u l c l a s s=” l i s t −u n s t y l e d n o t i f i c a t i o n s
<d i v c l a s s=” x c o n t e n t c l e a r f i x ” data−
bs−example− t a b b e d n o t i f i c a t i o n s=” n o t i f −g r o u p
p o p o v e r s ”> ”>
<d i v c l a s s=” a l e r t </u l >
a l e r t −w a r n i n g <d i v c l a s s=” c l e a r f i x ”></d i v>
alert − <d i v i d=” n o t i f −g r o u p ” c l a s s=”
dismissible t a b b e d n o t i f i c a t i o n s ”></d i v>
fade in ” r o l e </d i v>
=” a l e r t ”>
<b u t t o n t y p e=” @section ( ’ j s ’ )
button ” @include ( ’ i n c l u d e s / j s ’ )
c l a s s=” @show
close ”
data− </body>
d i s m i s s=” </html>
alert ”
aria−
l a b e l=”
C l o s e ”><
span a r i a
Listing 95: limits/create.blade.php
−h i d d e n=” @extends ( ’ l a y o u t s / m a s t e r ’ )
t r u e ”> @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
</span> @section ( ’ content ’ )
</button> <d i v c l a s s=” row ”>
{{ s e s s i o n ( ’ <d i v c l a s s=” c o l −md−12”>
warning ’ ) <d i v c l a s s=” x p a n e l ”>
}} <d i v c l a s s=” x t i t l e ”>
</d i v> <h2>Add L i q u i d and P l a s t i c
</d i v> L i m i t s T e s t Report </h2>
@endif <u l c l a s s=” nav navbar−r i g h t
@if ( s e s s i o n ( ’ p a n e l t o o l b o x ”>
warning e ’ ) ) < l i ><a c l a s s=” c o l l a p s e −
<d i v c l a s s=” x c o n t e n t l i n k ”><i c l a s s=” f a f a
bs−example− −c h e v r o n−up”></i ></a>
p o p o v e r s ”> </ l i >
<d i v c l a s s=” a l e r t < l i c l a s s=” dropdown ”>
a l e r t −w a r n i n g <a h r e f=”#” c l a s s=”
alert − dropdown−t o g g l e ”
dismissible data−t o g g l e=”
fade in ” r o l e dropdown ” r o l e=”
=” a l e r t ”> button ” aria −
<b u t t o n t y p e=” expanded=” f a l s e ”
button ” ><i c l a s s=” f a f a −
c l a s s=” wrench ”></i ></a>
close ” <u l c l a s s=” dropdown−
data− menu” r o l e=”menu”
d i s m i s s=” >
alert ” < l i ><a h r e f=”#”>
aria− S e t t i n g s 1</a
l a b e l=” >
C l o s e ”>< </ l i >
span a r i a < l i ><a h r e f=”#”>
−h i d d e n=” S e t t i n g s 2</a
t r u e ”> >
</span> </ l i >
</button> </u l >
{!! session ( ’ </ l i >
warning e </u l >
’) !!} <d i v c l a s s=” c l e a r f i x ”></d i v>
</d i v> </d i v>
</d i v> <d i v c l a s s=” x c o n t e n t ”>
@endif @if ( $counts > 0)
@ i f ( count ( $ e r r o r s ) > { ! ! Form : : open ( [ ’ name ’ => ’
0) u p d a t e f o r m ’ , ’ method ’ =>
<d i v c l a s s=” a l e r t ’POST ’ , ’ r o u t e ’ => [ ’
a l e r t −d a n g e r ” l i m i t s . s t o r e ’ , $ p r o j e c t −>
r o l e=” a l e r t ” i d ] , ’ c l a s s ’ => ’ form−
> h o r i z o n t a l form−l a b e l −
@foreach ( $ e r r o r s l e f t ’ , ’ i d ’ => ’
−> a l l ( ) a s update form ’ ] ) ! ! }
$error ) <?php $ c l a s s n u m = 0 ?>
<span c l a s s=” @for ( $ i = 0 ; $ i < s i z e o f (
160
$ c o u n t s ) ; $ i ++) ; ”>
<h4 a l i g n=” c e n t e r ”> <b u t t o n t y p e =
B o r e h o l e {{ $ i + 1 }} ” button ”
<s m a l l > { ! ! l i n k t o r o u t e ( ’ onclick =
b o r e h o l e s . show ’ , ’ ( ID ”addRow (
#’ . $ bo r eh o le s [ $ i ] . t h i s , {{
’ ) ’ , $boreholes [ $i ] , $class num
array ( ’ c l a s s ’ => ’ } } , {{
t o l o g i n ’ ) ) !!} </ $counts [
small> $i ] [ $j ]
</h4> }} , 0) ”
<t a b l e c l a s s=” t a b l e t a b l e − c l a s s=” {{
h o v e r ” i d=” t a b l e {{ $ i }} ”
> $class num
<thead> }} btn
<t r > btn−i n f o
<th>Sample</th> btn−sm
<th>Test </th> addBtn ”
<th>Water Content s t y l e=”
</th> width : 7 0
<th>No . o f Blows </ px ; ”><i
th> c l a s s=” f a
<t h w i d t h=”18%”> f a −p l u s
O p t i o n s </th> m−r i g h t −
</t r > sm”></i >
</thead> Add </
<tbody> button>
@for ( $ j = 0 ; $ j < </td>
sizeof ( $counts [ $i </t r >
] ) ; $ j ++) <?php $ c l a s s n u m++ ?>
<t r > <t r >
<t h s c o p e=” row ” <t h s c o p e=” row ”
s t y l e=” b o r d e r s t y l e=” b o r d e r
−t o p : 1 px −t o p : 1 px
s o l i d ; ”> s o l i d ; ”>
{{ $ j + 1 }} {{ $ j + 1 }}
{ ! ! Form : : { ! ! Form : :
hidden ( ’ hidden ( ’
sample id sample id
[] ’ , [] ’ ,
$counts [ $counts [
$i ] [ $j ] ) $i ] [ $j ] )
!!} !!}
<s m a l l > { ! ! <s m a l l > { ! !
link to route link to route
( ’ samples ( ’ samples
. show ’ , ’ . show ’ , ’
( ID# ’ . ( ID# ’ .
$counts [ $counts [
$i ] [ $j ] . $i ] [ $j ] .
’) ’ , ’) ’ ,
$counts [ $counts [
$i ] [ $j ] , $i ] [ $j ] ,
array ( ’ array ( ’
c l a s s ’ => c l a s s ’ =>
’ ’
to login ’ to login ’
) ) !!} </ ) ) !!} </
small> small>
</th> </th>
<t d s t y l e=” b o r d e r − <t d s t y l e=” b o r d e r −
t o p : 1 px s o l i d t o p : 1 px s o l i d
; ”> ; ”>
Liquid Limit P l a s t i c Limit
Test Test
{ ! ! Form : : { ! ! Form : :
hidden ( ’ hidden ( ’
lim test lim test
[ ] ’ , 0) [ ] ’ , 1)
!!} !!}
</td> </td>
<t d s t y l e=” b o r d e r − <t d s t y l e=” b o r d e r −
t o p : 1 px s o l i d t o p : 1 px s o l i d
; ”><i n p u t ; ”><i n p u t
t y p e=” number ” t y p e=” number ”
name=” name=”
lim water content lim water content
[ ] ” c l a s s=” [ ] ” c l a s s=”
form−c o n t r o l form−c o n t r o l
t o c l e a r col− t o c l e a r col−
md−7 c o l −xs md−7 c o l −xs
−12” s t e p=” −12” s t e p=”
any ” r e q u i r e d any ” r e q u i r e d
></td> ></td>
<t d s t y l e=” b o r d e r − <t d s t y l e=” b o r d e r −
t o p : 1 px s o l i d t o p : 1 px s o l i d
; ”><i n p u t ; ”>N/A</td>
t y p e=” number ” <!−− add t h i s { ! !
name=” Form : : h i d d e n (
lim num of blows ’
[ ] ” c l a s s=” lim num of blows
form−c o n t r o l [ ] ’ , −1) ! ! }
t o c l e a r col− −−>
md−7 c o l −xs <t d s t y l e=” b o r d e r −
−12” s t e p=” t o p : 1 px s o l i d
any ” r e q u i r e d ; ”>
></td> <b u t t o n t y p e =
<t d s t y l e=” b o r d e r − ” button ”
t o p : 1 px s o l i d onclick =
161
”addRow ( + ”<b u t t o n t y p e =’ b u t t o n ’
t h i s , {{ o n c l i c k = ’ removeRow (
$class num this , ” + class num +
} } , {{ ” , ” + sample id + ”
$counts [ , ” + test + ”) ; ’
$i ] [ $j ] c l a s s =’ btn btn−d a n g e r
}} , 1) ” btn−sm ’ s t y l e =’ f l o a t
c l a s s=” {{ : c e n t e r ; w i d t h : 7 0 px
;’>< i c l a s s =’ f a f a −
$class num t r a s h −o m−r i g h t −sm
}} btn ’></ i > D e l e t e </
btn−i n f o button ></td>”
btn−sm + ”</t r >” ) ;
addBtn ”
s t y l e=” // D e l e t e p r e v i o u s add b u t t o n
width : 7 0 $ ( ” . p r e v i o u s ” ) . c l o s e s t ( ” button ” ) .
px ; ”><i remove ( ) ;
c l a s s=” f a }
f a −p l u s
m−r i g h t − removeRow = f u n c t i o n ( p a r a m e t e r ,
sm”></i > class num , sample id , t e s t ) {
Add </
button> var current row = $ ( parameter ) .
</td> closest (” tr ”) ;
</t r > var c u r r e n t r o w t d = current row .
<?php $ c l a s s n u m++ ?> prev ( ” t r ” ) . f i n d ( ” t d : l a s t ” ) ;
@endfor
</tbody> // Append add b u t t o n t o p r e v i o u s
</ t a b l e > row i f c u r r e n t row i s l a s t
@endfor row o f s a m p l e i d
<d i v c l a s s=” l n s o l i d ”></d i v> i f ( $ ( parameter ) . c l o s e s t ( ” t r ” ) .
{ ! ! Form : : h i d d e n ( ’ p r o j i d ’ , f i n d ( ” button ” ) . hasClass ( ”
$ p r o j e c t −>i d ) ! ! } addBtn ” ) ) {
{ ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ c u r r e n t r o w t d . append ( ”<b u t t o n
Back ’ , array ( ’ c l a s s ’ => ’ t y p e =’ b u t t o n ’ o n c l i c k =
btn btn−d e f a u l t ’ ) ) ! ! } ’ addRow ( t h i s , ” +
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’ class num + ” , ” +
c l a s s ’ => ’ btn btn− sample id + ” , ” + test +
p r i m a r y ’ , ’ s t y l e ’ => ’ ” ) ; ’ c l a s s =’ ” +
float : right ’ ]) !!} c l a s s n u m + ” btn btn−
{ ! ! Form : : c l o s e ( ) ! ! } i n f o btn−sm addBtn ’ s t y l e
@else =’ f l o a t : l e f t ; w i d t h : 7 0 px
{ ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ ;’>< i c l a s s =’ f a f a −p l u s m
Back ’ , array ( ’ c l a s s ’ => ’ −r i g h t −x s ’></ i > Add </
btn btn−d e f a u l t ’ ) ) ! ! } button>” ) ;
@endif }
</d i v>
</d i v> // Remove row
</d i v> c u r r e n t r o w . remove ( ) ;
</d i v>
@endsection }
@section ( ’ j s ’ ) // } ) ;
@parent
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”> </ s c r i p t >
// $ ( d o c u m e n t ) . r e a d y ( f u n c t i o n ( ) { <!−− form w i z a r d −−>
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / w i z a r d / j q u e r y .
addRow = f u n c t i o n ( p a r a m e t e r , smartWizard . j s ’ ) }} ” t y p e=” t e x t /
class num , sample id , t e s t ) { j a v a s c r i p t ”></ s c r i p t >
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”>
$ ( ” . ”+c l a s s n u m+” ” ) . a d d C l a s s ( ” $ ( document ) . r e a d y ( f u n c t i o n ( ) {
previous ”) ; // Smart Wizard
$ ( ’#w i z a r d ’ ) . smartWizard ( ) ;
// Add row
i f ( t e s t == 0 ) { function onFinishCallback () {
v a r t d t e x t = ”<i n p u t t y p e =’ $ ( ’#w i z a r d ’ ) . smartWizard ( ’
number ’ name=’ showMessage ’ , ’ F i n i s h C l i c k e d
lim num of blows [ ] ’ c l a s s ’);
=’ form−c o n t r o l t o c l e a r }
c o l −md−7 c o l −xs −12 ’ s t e p }) ;
=’ any ’>” ;
} $ ( document ) . r e a d y ( f u n c t i o n ( ) {
else { // Smart Wizard
v a r t d t e x t = ”N/A” ; $ ( ’#w i z a r d v e r t i c l e ’ ) . smartWizard ( {
} transitionEffect : ’ slide ’
}) ;
var current row = $ ( parameter ) .
closest (” tr ”) ; }) ;
current row . a f t e r ( ”” </ s c r i p t >
+ ”<t r >” <!−− / form w i z a r d −−>
+ ”<td><i n p u t t y p e =’ h i d d e n <!−− i n p u t mask −−>
’ name=’ s a m p l e i d [ ] ’ < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / i n p u t m a s k /
v a l u e =’ ” + s a m p l e i d j q u e r y . inputmask . j s ’ ) }} ”></ s c r i p t >
+ ”’></td>” <s c r i p t >
+ ”<td><i n p u t t y p e =’ h i d d e n $ ( document ) . r e a d y ( f u n c t i o n ( ) {
’ name=’ l i m t e s t [ ] ’ $ ( ” : i n p u t ” ) . inputmask ( ) ;
v a l u e =’ ” + t e s t + ” }) ;
’></td>” </ s c r i p t >
+ ”<td><i n p u t t y p e =’number ’ name=’ <!−− / i n p u t mask −−>
l i m w a t e r c o n t e n t [ ] ’ c l a s s =’ form− @endsection
c o n t r o l t o c l e a r c o l −md−7 c o l −xs −12 ’
s t e p =’ any’></td>”
+ ”<td>” + t d t e x t + ”</td>”
+ ”<td><b u t t o n t y p e =’ b u t t o n ’ o n c l i c k = ’
addRow ( t h i s , ” + c l a s s n u m + ” , ” +
Listing 96: limits/edit.blade.php
sample id + ” , ” + test + ”) ; ’ c l a s s @extends ( ’ l a y o u t s / m a s t e r ’ )
=’ ” + c l a s s n u m + ” btn btn−i n f o btn− @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
sm addBtn ’ s t y l e =’ f l o a t : l e f t ; w i d t h @section ( ’ content ’ )
: 7 0 px;’>< i c l a s s =’ f a f a −p l u s m−r i g h t − <d i v c l a s s=” row ”>
sm’></ i > Add </button>” <d i v c l a s s=” c o l −md−12”>
162
<d i v c l a s s=” x p a n e l ”> == 1 && $ l i m i t −>
<d i v c l a s s=” x t i t l e ”> l i m r u n n u m == 1 )
<h2>E d i t L i q u i d and P l a s t i c <?php $ t d s t y l e = ”
L i m i t s T e s t Report </h2> b o r d e r −t o p : 1 px
<u l c l a s s=” nav navbar−r i g h t s o l i d ; ” ?>
p a n e l t o o l b o x ”> @endif
< l i ><a c l a s s=” c o l l a p s e − <t r >
l i n k ”><i c l a s s=” f a f a <t h s c o p e=” row ”
−c h e v r o n−up”></i ></a> s t y l e=” {{
</ l i > $ t d s t y l e }} ”
< l i c l a s s=” dropdown ”> >
<a h r e f=”#” c l a s s=” @if (
dropdown−t o g g l e ” $prev sample id
data−t o g g l e=” !=
dropdown ” r o l e=” $sample−>
button ” aria − id )
expanded=” f a l s e ” {{ $sample−>
><i c l a s s=” f a f a − sample num
wrench ”></i ></a> }}
<u l c l a s s=” dropdown− <s m a l l > { ! !
menu” r o l e=”menu” link to route
> ( ’ samples
< l i ><a h r e f=”#”> . show ’ , ’
S e t t i n g s 1</a ( ID# ’ .
> $sample−>
</ l i > id . ’ ) ’ ,
< l i ><a h r e f=”#”> $sample
S e t t i n g s 2</a −>i d ,
> array ( ’
</ l i > c l a s s ’ =>
</u l > ’
</ l i > to login ’
</u l > ) ) !!} </
<d i v c l a s s=” c l e a r f i x ”></d i v> small>
</d i v> { ! ! Form : :
<d i v c l a s s=” x c o n t e n t ”> hidden ( ’
@ i f ( s i z e o f ( $ b o r e h o l e s ) == 0 ) sample id
<h4 a l i g n=” c e n t e r ”>There a r e [] ’ ,
no e x i s t i n g s a m p l e s . </h4> $sample−>
@else id ) ! ! }
{ ! ! Form : : open ( [ ’ name ’ => ’ { ! ! Form : :
u p d a t e f o r m ’ , ’ method ’ => hidden ( ’
’PUT ’ , ’ r o u t e ’ => [ ’ limit id
l i m i t s . update ’ , [] ’ ,
$ s u b r e p o r t −>i d ] , ’ c l a s s ’ $ l i m i t −>
=> ’ form−h o r i z o n t a l form− id ) ! ! }
l a b e l − l e f t ’ , ’ i d ’ => ’ @else
update form ’ ] ) ! ! } { ! ! Form : :
<?php hidden ( ’
$class num = 0; sample id
$i = 0; [] ’ ,
?> $sample−>
@foreach ( $ b o r e h o l e s as id ) ! ! }
$borehole ) { ! ! Form : :
<h4 a l i g n=” c e n t e r ”> hidden ( ’
B o r e h o l e {{ $ b o r e h o l e −> limit id
bh num }} [] ’ ,
<s m a l l > { ! ! l i n k t o r o u t e ( ’ $ l i m i t −>
b o r e h o l e s . show ’ , ’ ( ID id ) ! ! }
# ’ . $ b o r e h o l e −>i d . @endif
’ ) ’ , $ b o r e h o l e −>i d , </th>
array ( ’ c l a s s ’ => ’ <t d s t y l e=” {{
t o l o g i n ’ ) ) !!} </ $ t d s t y l e }} ”
small> >
</h4> {{ ( $ l i m i t −>
<t a b l e c l a s s=” t a b l e t a b l e − lim test
h o v e r ” i d=” t a b l e {{ $ i }} ” == 0 ) ? ’
> Liquid
<thead> Limit
<t r > Test ’ : ’
<th>Sample</th> Plastic
<th>Test </th> Limit
<th>Water Content T e s t ’ }}
</th> { ! ! Form : :
<th>No . o f Blows </ hidden ( ’
th> lim test
</t r > [] ’ ,
</thead> $ l i m i t −>
<tbody> lim test )
<?php $ p r e v s a m p l e i d !!}
= 0 ?> </td>
@foreach ( $samples as <t d s t y l e=” {{
$sample ) $ t d s t y l e }} ”
@ i f ( $sample−>b h i d == ><i n p u t t y p e=
$ b o r e h o l e −>i d ) ” number ” name
@foreach ( $ l i m i t s as =”
$limit ) lim water content
@ i f ( $ l i m i t −>s a m p l e i d [ ] ” c l a s s=”
== $sample−>i d ) form−c o n t r o l
@ i f ( $ p r e v s a m p l e i d != t o c l e a r col−
$sample−>i d ) md−7 c o l −xs
<?php $ t d s t y l e = ” −12” s t e p=”
b o r d e r −t o p : 1 px any ” v a l u e=”
s o l i d ; ” ?> {{ $ l i m i t −>
@else lim water content
<?php $ t d s t y l e = ” ” }} ” r e q u i r e d
?> ></td>
@endif @ i f ( $ l i m i t −>
@ i f ( $ l i m i t −>l i m t e s t lim num of blows
163
!= −1) </ l i >
<t d s t y l e=” {{ < l i ><a h r e f=”#”>
$ t d s t y l e }} ” S e t t i n g s 2</a
><i n p u t t y p e= >
” number ” name </ l i >
=” </u l >
lim num of blows </ l i >
[ ] ” c l a s s=” </u l >
form−c o n t r o l <d i v c l a s s=” c l e a r f i x ”></d i v>
t o c l e a r col− </d i v>
md−7 c o l −xs <d i v c l a s s=” x c o n t e n t ”>
−12” s t e p=” @ i f ( s i z e o f ( $ b o r e h o l e s ) == 0 )
any ” v a l u e=” <h4 a l i g n=” c e n t e r ”>There a r e
{{ $ l i m i t −> no e x i s t i n g s a m p l e s . </h4>
lim num of blows @else
}} ” r e q u i r e d <?php $ i = 0 ?>
></td> @foreach ( $ b o r e h o l e s as
@else $borehole )
<t d s t y l e=” {{ <h4 a l i g n=” c e n t e r ”>
$ t d s t y l e }} ” B o r e h o l e {{ $ b o r e h o l e −>
>N/A</td> bh num }}
{ ! ! Form : : h i d d e n ( ’ <s m a l l > { ! ! l i n k t o r o u t e ( ’
lim num of blows b o r e h o l e s . show ’ , ’ ( ID
[ ] ’ , −1) ! ! } # ’ . $ b o r e h o l e −>i d .
@endif ’ ) ’ , $ b o r e h o l e −>i d ,
</t r > array ( ’ c l a s s ’ => ’
<?php $ p r e v s a m p l e i d t o l o g i n ’ ) ) !!} </
= $sample−>i d ?> small>
@endif </h4>
@endforeach <t a b l e c l a s s=” t a b l e t a b l e −
@endif h o v e r ” i d=” t a b l e {{ $ i }} ”
<?php $ c l a s s n u m++ ?> >
@endforeach <thead>
</tbody> <t r >
</ t a b l e > <th>Sample</th>
<?php $ i++ ?> <th>Test </th>
@endforeach <th>Water Content
<d i v c l a s s=” l n s o l i d ”></d i v> </th>
{ ! ! Form : : h i d d e n ( ’ p r o j i d ’ , <th>No . o f Blows </
$ p r o j e c t −>i d ) ! ! } th>
{ ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ </t r >
Back ’ , array ( ’ c l a s s ’ => ’ </thead>
btn btn−d e f a u l t ’ ) ) ! ! } <tbody>
{ ! ! Form : : b u t t o n ( ’ C l e a r ’ , [ ’ <?php $ p r e v s a m p l e i d
c l a s s ’ => ’ btn btn−d a n g e r = 0 ?>
’ , ’ o n c l i c k ’ => ’ @foreach ( $samples as
clearForm ( ) ’ ] ) ! ! } $sample )
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’ @ i f ( $sample−>b h i d ==
c l a s s ’ => ’ btn btn− $ b o r e h o l e −>i d )
p r i m a r y ’ , ’ s t y l e ’ => ’ @foreach ( $ l i m i t s as
float : right ’ ]) !!} $limit )
{ ! ! Form : : c l o s e ( ) ! ! } @ i f ( $ l i m i t −>s a m p l e i d
@endif == $sample−>i d )
<d i v c l a s s=” l n s o l i d ”></d i v> @ i f ( $ p r e v s a m p l e i d !=
</d i v> $sample−>i d )
</d i v> <?php $ t d s t y l e = ”
</d i v> b o r d e r −t o p : 1 px
</d i v> s o l i d ; ” ?>
@endsection @else
@section ( ’ j s ’ ) <?php $ t d s t y l e = ” ”
@parent ?>
@include ( ’ i n c l u d e s / clearform ’ ) @endif
@endsection @ i f ( $ l i m i t −>l i m t e s t
== 1 && $ l i m i t −>
l i m r u n n u m == 1 )
<?php $ t d s t y l e = ”
Listing 97: limits/index.blade.php b o r d e r −t o p : 1 px
s o l i d ; ” ?>
@extends ( ’ l a y o u t s / m a s t e r ’ ) @endif
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) <t r >
@section ( ’ content ’ ) <t h s c o p e=” row ”
<d i v c l a s s=” row ”> s t y l e=” {{
<d i v c l a s s=” c o l −md−12”> $ t d s t y l e }} ”
<d i v c l a s s=” x p a n e l ”> >
<d i v c l a s s=” x t i t l e ”> @if (
<h2>L i q u i d and P l a s t i c L i m i t s $prev sample id
T e s t R e p o r t − L i q u i d and !=
P l a s t i c L i m i t s </h2> $sample−>
<u l c l a s s=” nav navbar−r i g h t id )
p a n e l t o o l b o x ”> {{ $sample−>
< l i ><a c l a s s=” c o l l a p s e − sample num
l i n k ”><i c l a s s=” f a f a }}
−c h e v r o n−up”></i ></a> <s m a l l > { ! !
</ l i > link to route
< l i c l a s s=” dropdown ”> ( ’ samples
<a h r e f=”#” c l a s s=” . show ’ , ’
dropdown−t o g g l e ” ( ID# ’ .
data−t o g g l e=” $sample−>
dropdown ” r o l e=” id . ’ ) ’ ,
button ” aria − $sample
expanded=” f a l s e ” −>i d ,
><i c l a s s=” f a f a − array ( ’
wrench ”></i ></a> c l a s s ’ =>
<u l c l a s s=” dropdown− ’
menu” r o l e=”menu” to login ’
> ) ) !!} </
< l i ><a h r e f=”#”> small>
S e t t i n g s 1</a @endif
> </th>
164
<t d s t y l e=” {{ dropdown−t o g g l e ”
$ t d s t y l e }} ” data−t o g g l e=”
> dropdown ” r o l e=”
{{ ( $ l i m i t −> button ” aria −
lim test expanded=” f a l s e ”
=== 0 ) ? ><i c l a s s=” f a f a −
” Liquid wrench ”></i ></a>
Limit <u l c l a s s=” dropdown−
Test ” : ” menu” r o l e=”menu”
Plastic >
Limit < l i ><a h r e f=”#”>
T e s t ” }} S e t t i n g s 1</a
</td> >
<t d s t y l e=” {{ </ l i >
$ t d s t y l e }} ” < l i ><a h r e f=”#”>
>{{ $ l i m i t −> S e t t i n g s 2</a
lim water content >
}}</td> </ l i >
<t d s t y l e=” {{ </u l >
$ t d s t y l e }} ” </ l i >
> </u l >
{{ ( $ l i m i t −> <d i v c l a s s=” c l e a r f i x ”></d i v>
lim num of blows </d i v>
=== −1) <d i v c l a s s=” x c o n t e n t ”>
? ”N/A” : <!−− Smart Wizard −−>
$ l i m i t −> <d i v i d=” w i z a r d ” c l a s s=”
lim num of blows form wizard
}} w i z a r d h o r i z o n t a l ”>
</td> <u l c l a s s=” w i z a r d s t e p s ”>
</t r > <l i >
<?php $ p r e v s a m p l e i d <a h r e f=”#s t e p −1”>
= $sample−>i d ?> <span c l a s s=”
@endif s t e p n o ”>1</
@endforeach span>
@endif <span c l a s s=”
@endforeach s t e p d e s c r ”>
</tbody> B a s i c D e t a i l s <b r
</ t a b l e > />
<?php $ i++ ?> </span>
@endforeach </a>
<d i v c l a s s=” l n s o l i d ”></d i v> </ l i >
{ ! ! Form : : open ( [ ’ method ’ => ’ <l i >
DELETE ’ , ’ r o u t e ’ => [ ’ <a h r e f=”#s t e p −2”>
l i m i t s . destroy ’ , <span c l a s s=”
$ s u b r e p o r t −>i d ] , ’ s t e p n o ”>2</
o n su b mi t ’ => ’ r e t u r n span>
confirm (” Delete l i m i t s <span c l a s s=”
and p l a s t i c l i m i t s t e s t s t e p d e s c r ”>
r e p o r t permanently ?”) ’ ] ) Dates<b r />
!!} </span>
{ ! ! Form : : s u b m i t ( ’ D e l e t e ’ , [ ’ </a>
c l a s s ’ => ’ btn btn−d a n g e r </ l i >
’ ]) !!} <l i >
<a h r e f=” {{ r o u t e ( ’ l i m i t s . e d i t <a h r e f=”#s t e p −3”>
’ , $ p r o j e c t −>i d ) }} ” <span c l a s s=”
c l a s s=” btn btn−i n f o ” s t e p n o ”>3</
s t y l e=” f l o a t : r i g h t ”><i span>
c l a s s=” f a f a −e d i t m−r i g h t <span c l a s s=”
−x s ”></i > E d i t </a> s t e p d e s c r ”>
{ ! ! Form : : c l o s e ( ) ! ! } Manage Members<b r
@endif />
<d i v c l a s s=” l n s o l i d ”></d i v> </span>
</d i v> </a>
</d i v> </ l i >
</d i v> </u l >
</d i v> <!−− s t e p 1 −−>
@endsection <d i v i d=” s t e p −1”>
{ ! ! Form : : open ( [ ’ name ’
=> ’ u p d a t e f o r m ’
, ’ method ’ => ’
Listing 98: projects/edit.blade.php PUT ’ , ’ r o u t e ’ =>
[ ’ p r o j e c t s . update
@extends ( ’ l a y o u t s / m a s t e r ’ ) ’ , $ p r o j e c t −>i d ] ,
@ s e c t i o n ( ’ t i t l e ’ , ’ E d i t ’ . $ p r o j e c t −> ’ c l a s s ’ => ’ form
proj name ) −h o r i z o n t a l form−
@section ( ’ s t y l e s h e e t s ’ ) l a b e l −l e f t ’ , ’ id ’
@parent => ’ u p d a t e f o r m ’
<s t y l e > ]) !!}
. check { <d i v c l a s s=” form−g r o u p
opacity : 0 . 5 ; ”>
c o l o r :#9 9 6 ; { ! ! Form : : l a b e l ( ’
} proj name ’ , ’
</ s t y l e > P r o j e c t Name
@endsection ∗ ’ , array ( ’
@section ( ’ content ’ ) c l a s s ’ => ’
<d i v c l a s s=” row ”> c o n t r o l −l a b e l
<d i v c l a s s=” c o l −md−12 c o l −sm−12 c o l −xs −12” c o l −md−3 c o l
> −sm−3 c o l −xs
<d i v c l a s s=” x p a n e l ”> −12 ’ ) ) ! ! }
<d i v c l a s s=” x t i t l e ”> <d i v c l a s s=” c o l −md
<h2> P r o j e c t D e t a i l s </h2> −6 c o l −sm−6
<u l c l a s s=” nav navbar−r i g h t c o l −xs −12”>
p a n e l t o o l b o x ”> { ! ! Form : : t e x t
< l i ><a c l a s s=” c o l l a p s e − (’
l i n k ”><i c l a s s=” f a f a proj name
−c h e v r o n−up”></i ></a> ’,
</ l i > $project
< l i c l a s s=” dropdown ”> −>
<a h r e f=”#” c l a s s=” proj name
165
, [ ’ class −>
’ => ’ proj description
form− , [ ’ class
control ’ => ’
c o l −md−7 form−
c o l −xs −12 control
’, ’ c o l −md−7
required ’ c o l −xs −12
=> ’ t r u e ’ ]) !!}
’ ]) !!} </d i v>
</d i v> </d i v>
</d i v> </d i v>
<d i v c l a s s=” form−g r o u p <!−− / s t e p 1 −−>
”> <!−− s t e p 2 −−>
{ ! ! Form : : l a b e l ( ’ <d i v i d=” s t e p −2”>
proj location <d i v c l a s s=” form−
’ , ’ Location h o r i z o n t a l form−
∗ ’ , array ( ’ l a b e l − l e f t ”>
c l a s s ’ => ’ <d i v c l a s s=” form−
c o n t r o l −l a b e l g r o u p ”>
c o l −md−3 c o l { ! ! Form : :
−sm−3 c o l −xs label ( ’
−12 ’ ) ) ! ! } proj start date
<d i v c l a s s=” c o l −md ’ , ’ Start
−6 c o l −sm−6 Date ∗ ’ ,
c o l −xs −12”> array ( ’
{ ! ! Form : : t e x t c l a s s ’ =>
(’ ’ control
proj location −l a b e l
’, c o l −md−3
$project c o l −sm−3
−> c o l −xs −12
proj location ’)) !!}
, [ ’ class <d i v c l a s s=”
’ => ’ c o l −md−6
form− c o l −sm−6
control c o l −xs −12
c o l −md−7 ”>
c o l −xs −12 { ! ! Form : :
’, ’ date (
required ’ ’
=> ’ t r u e proj start date
’ ]) !!} ’,
</d i v> $project
</d i v> −>
<d i v c l a s s=” form−g r o u p proj start date
”> , [ ’
{ ! ! Form : : l a b e l ( ’ class
proj client ’ , ’ =>
’ Client ∗ ’ , ’ form
array ( ’ c l a s s ’ −
=> ’ c o n t r o l − control
l a b e l c o l −md col−
−3 c o l −sm−3 md−7
c o l −xs −12 ’ ) ) col−
!!} xs −12
<d i v c l a s s=” c o l −md ’, ’
−6 c o l −sm−6 required
c o l −xs −12”> ’ =>
{ ! ! Form : : t e x t ’ true
(’ ’, ’
proj client form ’
’, => ’
$project update form
−> ’ ])
proj client !!}
, [ ’ class </d i v>
’ => ’ </d i v>
form− <d i v c l a s s=” form−
control g r o u p ”>
c o l −md−7 { ! ! Form : :
c o l −xs −12 label ( ’
’, ’ proj end date
required ’ ’ , ’ End
=> ’ t r u e Date ∗ ’ ,
’ ]) !!} array ( ’
</d i v> c l a s s ’ =>
</d i v> ’ control
<d i v c l a s s=” form−g r o u p −l a b e l
”> c o l −md−3
{ ! ! Form : : l a b e l ( ’ c o l −sm−3
proj description c o l −xs −12
’, ’ ’)) !!}
Description ’ , <d i v c l a s s=”
array ( ’ c l a s s c o l −md−6
’ => ’ c o n t r o l c o l −sm−6
−l a b e l c o l −md c o l −xs −12
−3 c o l −sm−3 ”>
c o l −xs −12 ’ ) ) { ! ! Form : :
!!} date (
<d i v c l a s s=” c o l −md ’
−6 c o l −sm−6 proj end date
c o l −xs −12”> ’,
{ ! ! Form : : $project
textarea ( −>
’ proj end date
proj description , [ ’
’, class
$project ’ =>
166
’ form ;
−
control for ( $ i =
col− 0; $i
md−7 <
col− sizeof
xs −12 (
’, ’ $engineers
required ) ; $i
’ => ++) {
’ true $engineer id array
’, ’ [
form ’ $i
=> ’ ]
update form
’ ]) =
!!}
</d i v> $engineers
</d i v> [
<d i v c l a s s=” form− $i
g r o u p ”> ]−>
{ ! ! Form : : id
label ( ’ ;
proj date signed }
’ , ’ Date ?>
Signed ∗ ’ @foreach (
, array ( ’ $members
c l a s s ’ => as
’ control $member )
−l a b e l <?php
c o l −md−3 $checkbox class
c o l −sm−3 = ””
c o l −xs −12 ;
’)) !!} $is checked
<d i v c l a s s=” =
c o l −md−6 null ;
c o l −sm−6 ?>
c o l −xs −12 @if ( in array (
”> $member−>
{ ! ! Form : : id ,
date ( $engineer id array
’ ))
proj date signed <?php
’, $checkbox class
$project = ”
−> check
proj date signed ”;
, [ ’ $is checked
class =
’ => true ;
’ form ?>
− @endif
control <d i v c l a s s=”
col− c o l −md−3”
md−7 >
col− <l a b e l
xs −12 class
’, ’ =” btn
required btn−
’ => primary
’ true ”>
’, ’ <img s r c=”
form ’ {{
=> ’ URL : :
update form asset
’ ]) (
!!} $member
</d i v> −>
</d i v> image
</d i v> ) }} ”
</d i v> a l t=
<!−− / s t e p 2 −−> ” {{
<!−− s t e p 3 −−> $member
<d i v i d=” s t e p −3”> −>
<d i v c l a s s=” form− lastname
h o r i z o n t a l form− }} ”
l a b e l − l e f t ”> class
<d i v c l a s s=” form− =” img
g r o u p ” a l i g n= −
” c e n t e r ”> thumbnail
@ i f ( Auth : : u s e r img−
( )−> check
isAdmin ( ) {{
) $checkbox class
<?php }} ”
$members = width
=” 150
Helper px ”>
:: { ! ! Form : :
getMembers checkbox
() ; (’
$engineers project members
= [] ’ ,
Helper $member
:: −>i d ,
getEngineers
( $is checked
$project , [ ’
−>i d ) class
167
’ => }) ;
’’, ’ $ ( ”#p r o j e c t m e m b e r s ” ) . c l i c k ( f u n c t i o n ( )
autocomplete {
’ => $ ( t h i s ) . prop ( ” c h e c k e d ” , true ) ;
’ off ’ }) ;
, ’ }) ;
form ’ </ s c r i p t >
=> ’ <!−− / c h e c k b o x −−>
u p d a t e f o@
rmendsection
’, ’
id ’
=> ’
project members
[] ’ ])
Listing 99: projects/index.blade.php
!!} @extends ( ’ l a y o u t s / m a s t e r ’ )
</ l a b e l > @ s e c t i o n ( ’ t i t l e ’ , ’ Manage P r o j e c t s ’ )
{ ! ! Form : : @section ( ’ content ’ )
label <!−− add p r o j e c t −−>
(’ <d i v c l a s s=” row ”>
member name <d i v c l a s s=” c o l −md−12”>
’, <d i v c l a s s=” x p a n e l ”>
$member <d i v c l a s s=” x t i t l e ”>
−> <h2>Add P r o j e c t </h2>
firstname <u l c l a s s=” nav navbar−r i g h t
. ’ p a n e l t o o l b o x ”>
’ . < l i ><a c l a s s=” c o l l a p s e −
$member l i n k ”><i c l a s s=” f a f a
−> −c h e v r o n−up”></i ></a>
lastname </ l i >
) !!} < l i c l a s s=” dropdown ”>
</d i v> <a h r e f=”#” c l a s s=”
@endforeach dropdown−t o g g l e ”
@else data−t o g g l e=”
<h4>You a r e dropdown ” r o l e=”
not button ” aria −
permitted expanded=” f a l s e ”
t o add / ><i c l a s s=” f a f a −
remove wrench ”></i ></a>
members <u l c l a s s=” dropdown−
in a menu” r o l e=”menu”
project >
. </h4> < l i ><a h r e f=”#”>
@endif S e t t i n g s 1</a
</d i v> >
</d i v> </ l i >
</d i v> < l i ><a h r e f=”#”>
</d i v> S e t t i n g s 2</a
<!−− / s t e p 3 −−> >
<!−− End SmartWizard Content </ l i >
−−> </u l >
{ ! ! Form : : c l o s e ( ) ! ! } </ l i >
<d i v c l a s s=” l n s o l i d ”></d i v> </u l >
</d i v> <d i v c l a s s=” c l e a r f i x ”></d i v>
</d i v> </d i v>
</d i v> { ! ! Form : : open ( [ ’ r o u t e ’ => [ ’
</d i v> projects . store ’ ] ] ) !!}
@endsection <d i v c l a s s=” x c o n t e n t ”>
@section ( ’ j s ’ ) <d i v c l a s s=” c o l −md−55”>
@parent <d i v c l a s s=” t h u m b n a i l ”>
<!−− form w i z a r d −−> <d i v c l a s s=” image v i e w
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / w i z a r d / j q u e r y . view− f i r s t ”>
smartWizard . j s ’ ) }} ” t y p e=” t e x t / <img s t y l e=” w i d t h :
j a v a s c r i p t ”></ s c r i p t > 100%;
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”> display :
$ ( document ) . r e a d y ( f u n c t i o n ( ) { b l o c k ; ” s r c=”
// Smart Wizard {{ URL : : a s s e t
$ ( ’#w i z a r d ’ ) . smartWizard ( ) ; ( ’ images /
p r o j e c t s / no−
function onFinishCallback () { p r o j e c t −image
$ ( ’#w i z a r d ’ ) . smartWizard ( ’ . j p g ’ ) }} ”
showMessage ’ , ’ F i n i s h C l i c k e d a l t=” image ”
’); />
// a l e r t ( ’ F i n i s h C l i c k e d ’ ) ; <d i v c l a s s=”mask”>
} <p>Add P r o j e c t
}) ; </p>
<d i v c l a s s=”
$ ( document ) . r e a d y ( f u n c t i o n ( ) { tools
// Smart Wizard tools−
$ ( ’#w i z a r d v e r t i c l e ’ ) . smartWizard ( { bottom ”>
transitionEffect : ’ slide ’ <span
}) ; class
=”
}) ; glyphicon
</ s c r i p t >
<!−− / form w i z a r d −−> glyphicon
<!−− i n p u t mask −−> −
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / i n p u t m a s k / search
j q u e r y . inputmask . j s ’ ) }} ”></ s c r i p t > ”
<s c r i p t > aria−
$ ( document ) . r e a d y ( f u n c t i o n ( ) { hidden
$ ( ” : i n p u t ” ) . inputmask ( ) ; =”
}) ; true ”
</ s c r i p t > ></
<!−− / i n p u t mask −−> span>
<!−− c h e c k b o x −−> </d i v>
<s c r i p t > </d i v>
$ ( document ) . r e a d y ( f u n c t i o n ( e ) { </d i v>
$ ( ” . img−c h e c k ” ) . c l i c k ( f u n c t i o n ( ) { <d i v c l a s s=” c a p t i o n ”>
$ ( t h i s ) . t o g g l e C l a s s ( ” check ” ) ; <p>
168
<c e n t e r > </u l >
{ ! ! Form : : t e x t </ l i >
(’ </u l >
proj name <d i v c l a s s=” c l e a r f i x ”></d i v>
’ , old ( ’ </d i v>
proj name <d i v c l a s s=” x c o n t e n t ”>
’) , [ ’ <?php $hasTagged = f a l s e ; ?>
c l a s s ’ => @foreach ( $ p r o j e c t s as $proj )
’ form− @ i f ( $ p r o j −>i s T a g g e d ( ) )
control ’ , <?php
’ $hasTagged = true ;
placeholder break ;
’ => ’ ?>
Project @endif
Name ’ , ’ @endforeach
required ’ @ i f ( $hasTagged )
=> ’ t r u e <t a b l e c l a s s=” t a b l e t a b l e −
’ ]) !!} s t r i p e d t a b l e −h o v e r
</ c e n t e r > p r o j e c t s ”>
</p> <thead>
</d i v> <t r >
</d i v> <t h s t y l e=” w i d t h :
</d i v> 10 px ”>ID</th>
<d i v c l a s s=” c o l −md−4”> <t h s t y l e=” w i d t h :
<d i v c l a s s=” form−g r o u p ”> 30%”>P r o j e c t
{ ! ! Form : : l a b e l ( ’ Name</th>
proj client ’ , ’ <t h s t y l e=” w i d t h :
Project Client : ’ ) 20%”>Team
!!} Members</th>
{ ! ! Form : : t e x t ( ’ <t h s t y l e=” w i d t h :
p r o j c l i e n t ’ , old 10%”>S t a t u s </
( ’ proj client ’) , th>
[ ’ c l a s s ’ => ’ form <t h s t y l e=” w i d t h :
−c o n t r o l ’ , ’ 30%”>A c t i o n s
p l a c e h o l d e r ’ => ’ </th>
’ , ’ r e q u i r e d ’ => </t r >
’ true ’ ] ) ! ! } </thead>
</d i v> <tbody>
<d i v c l a s s=” form−g r o u p ”> @foreach ( $ p r o j e c t s as
{ ! ! Form : : l a b e l ( ’ $proj )
proj location ’ , ’ @ i f ( $ p r o j −>i s T a g g e d ( ) )
Project Location : <t r >
’) !!} <td >{{ $ p r o j −>i d
{ ! ! Form : : t e x t ( ’ }}</td>
proj location ’ , <td>
old ( ’ <a h r e f=” {{
proj location ’ ) , route ( ’
[ ’ c l a s s ’ => ’ form projects .
−c o n t r o l ’ , ’ show ’ ,
p l a c e h o l d e r ’ => ’ $ p r o j −>i d
’ , ’ r e q u i r e d ’ => ) }} ”>{{
’ true ’ ] ) ! ! } $ p r o j −>
</d i v> proj name
{ ! ! Form : : s u b m i t ( ’ Submit ’ , }}</a>
[ ’ c l a s s ’ => ’ btn btn <b r />
−p r i m a r y ’ ] , [ ’ s t y l e ’ <s m a l l >C r e a t e d
=> ’ margin−r i g h t : 15 {{ $ p r o j
px ; ’ ] ) ! ! } −>
</d i v> created at
</d i v> }}</
{ ! ! Form : : c l o s e ( ) ! ! } small>
</d i v> </td>
</d i v> <td>
</d i v> <u l c l a s s=”
<!−− / add p r o j e c t −−> list −
<!−− t a g g e d p r o j e c t s −−> i n l i n e ”>
<d i v c l a s s=” row ” i d=” t a g g e d p r o j e c t s ”> <?php
<d i v c l a s s=” c o l −md−12”> $engineers
<d i v c l a s s=” x p a n e l ”> =
<d i v c l a s s=” x t i t l e ”> Helper
<h2>Tagged P r o j e c t s <s m a l l > ::
Validate p r o j e c t s to getEngineers
a r c h i v e them</s m a l l ></h2> (
<u l c l a s s=” nav navbar−r i g h t $proj
p a n e l t o o l b o x ”> −>i d )
< l i ><a c l a s s=” c o l l a p s e − ?>
l i n k ”><i c l a s s=” f a f a @foreach (
−c h e v r o n−up”></i ></a> $engineers
</ l i > as
< l i c l a s s=” dropdown ”> $engr
<a h r e f=”#” c l a s s=” )
dropdown−t o g g l e ” <l i >
data−t o g g l e=” <img
dropdown ” r o l e=” src
button ” aria − =
expanded=” f a l s e ” ”
><i c l a s s=” f a f a − {{
wrench ”></i ></a>
<u l c l a s s=” dropdown− URL
menu” r o l e=”menu” ::
> asset
< l i ><a h r e f=”#”> (
S e t t i n g s 1</a $engr
> −>
</ l i > image
< l i ><a h r e f=”#”> )
S e t t i n g s 2</a
> }}
</ l i > ”
169
fa
class −
= eye
” ”
avatar ></
” i
>
alt
= View
”
{{ </
a
$engr >
−>
firstname </td>
<td>
. <a
$engr href
−> =
lastname ”
{{
}}
” route
> (’
</ l i > projects
@endforeach .
edit
</u l > ’,
</td>
<td> $proj
<b u t t o n t y p e=” −>
button ” id
c l a s s=” )
btn btn−
warning }}
btn−x s ” ”
s t y l e=”
width : 7 0 class
px ”> =
Tagged </ ”
button> btn
</td>
<td> btn
<t a b l e b o r d e r= −
” 0 ”> info
<t r >
<td> btn
<a −
xs
href ”
=
” style
{{ =
”
route width
(’ :70
projects px
. ”
show ><
’, i
$proj class
−> =
id ”
) fa
}} fa
” −
pencil
class ”
= ></
” i
btn >
btn Edit
−
primary </
a
btn >
−
xs </td>
” <td>
<a
style
= href
” =
width ”
:70 {{
px
” route
>< (’
i projects
.
class archive
= ’,
”
fa $proj
−>
170
id
) project
}} ’
” .
class $proj
= −>
” proj name
btn
.
btn ’
−
dark permanently
?”)
btn ’
− ])
xs
” !!}
style {!!
=
” Form
width ::
:70 submit
px (
” ’
>< Delete
i ’
,
class
= [
” ’
fa class
’
fa
− =>
archive
” ’
></ btn
i
> btn
−
Archive danger
</ btn
a −
> xs
’
</td> ,
<td>
{!! ’
style
Form ’
::
open =>
([
’ ’
method width
’ :70
px
=> ’
])
’
DELETE !!}
’
, {!!
’ Form
route ::
’ close
()
=>
!!}
[
’ </td>
projects </t r >
. </ t a b l e >
destroy </td>
’ </t r >
, @endif
@endforeach
$proj </tbody>
−> </ t a b l e >
id @else
], <c e n t e r >
<h2>There a r e no t a g g e d
’ p r o j e c t s . </h2>
o ns u b mi t </ c e n t e r >
’ @endif
<d i v c l a s s=” l n s o l i d ”></d i v>
=> </d i v>
</d i v>
’ </d i v>
r e t ui v>
</d rn
<!−− / t a g g e d p r o j e c t s −−>
c o n f i raml l p r o j e c t s −−>
<!−−
<d
( ” i v c l a s s=” row ”>
D e l e<dt e i v c l a s s=” c o l −md−12”>
171
<d i v c l a s s=” x p a n e l ”> ?>
<d i v c l a s s=” x t i t l e ”> @foreach (
<h2>A l l P r o j e c t s </h2> $engineers
<u l c l a s s=” nav navbar−r i g h t as
p a n e l t o o l b o x ”> $engr
< l i ><a c l a s s=” c o l l a p s e − )
l i n k ”><i c l a s s=” f a f a <l i >
−c h e v r o n−up”></i ></a> <img
</ l i > src
< l i c l a s s=” dropdown ”> =
<a h r e f=”#” c l a s s=” ”
dropdown−t o g g l e ” {{
data−t o g g l e=”
dropdown ” r o l e=” URL
button ” aria − ::
expanded=” f a l s e ” asset
><i c l a s s=” f a f a − (
wrench ”></i ></a> $engr
<u l c l a s s=” dropdown− −>
menu” r o l e=”menu” image
> )
< l i ><a h r e f=”#”>
S e t t i n g s 1</a }}
> ”
</ l i >
< l i ><a h r e f=”#”> class
S e t t i n g s 2</a =
> ”
</ l i > avatar
</u l > ”
</ l i >
</u l > alt
<d i v c l a s s=” c l e a r f i x ”></d i v> =
</d i v> ”
<d i v c l a s s=” x c o n t e n t ”> {{
@ i f ( $ p r o j e c t s −>isEmpty ( ) )
<c e n t e r > $engr
<h2>There a r e no p r o j e c t s −>
. </h2> firstname
</ c e n t e r >
@else .
<t a b l e c l a s s=” t a b l e t a b l e −
s t r i p e d t a b l e −h o v e r ”
p r o j e c t s ”>
<thead> ”
<t r >
<t h s t y l e=” w i d t h : .
10 px ”>ID</th>
<t h s t y l e=” w i d t h : $engr
30%”>P r o j e c t −>
Name</th> lastname
<t h s t y l e=” w i d t h :
20%”>Team }}
Members</th> ”
<t h s t y l e=” w i d t h : >
10%”>S t a t u s </ </ l i >
th> @endforeach
<t h s t y l e=” w i d t h :
30%”>A c t i o n s </u l >
</th> </td>
</t r > <?php
</thead> switch ( $ p r o j −>
<tbody> proj status
@foreach ( $ p r o j e c t s as ) {
$proj ) case 0 :
<t r > $status
<td >{{ $ p r o j −>i d = ”
}}</td> Active
<td> ”;
<a h r e f=” {{ $btn
route ( ’
projects . =
show ’ ,
$ p r o j −>i d ”
) }} ”>{{ btn
$ p r o j −>
proj name btn
}}</a> −
<b r /> success
<s m a l l >C r e a t e d
{{ $ p r o j btn
−> −
created at xs
}}</ ”
small> ;
</td>
<td> break
<u l c l a s s=” ;
list −
i n l i n e ”> case 1 :
<?php $status
$engineers = ”
= Tagged
Helper ”;
:: $btn
getEngineers
( =
$proj
−>i d ) ”
172
btn =
”
btn width
− :70
warning px
”
btn ><
− i
xs
” class
; =
”
break fa
;
fa
case 2 : −
$status eye
= ” ”
Archived ></
”; i
$btn >
= View
” </
btn a
>
btn
− </td>
dark @if ( !
$proj
btn −>
− isArchived
xs ()
” )
; <td>
<a
break
; href
=
default : ”
break {{
;
} route
?> (’
<td> projects
<b u t t o n t y p e=” .
button ” edit
c l a s s=” {{ ’,
$btn }} ”
s t y l e=” $proj
width : 7 0 −>
px ”>{{ id
$status )
}}</
button> }}
</td> ”
<td>
<t a b l e b o r d e r= class
” 0 ”> =
<t r > ”
<td> btn
<a
btn
href −
= info
”
{{ btn
−
route xs
(’ ”
projects
. style
show =
’, ”
width
$proj :70
−> px
id ”
) ><
i
}}
” class
=
class ”
= fa
”
btn fa
−
btn pencil
− ”
primary ></
i
btn >
−
xs Edit
”
</
style a
173
> $proj
−>
</td> id
@endif )
@if (
$proj }}
−> ”
isTagged
() class
) =
<td> ”
<a btn
href btn
= −
” warning
{{
btn
route −
(’ xs
projects ”
.
archive style
’, =
”
$proj width
−> :70
id px
) ”
><
}} i
”
class
class =
= ”
” fa
btn
fa
btn −
− tag
dark ”
></
btn i
− >
xs
” Tag
style </
= a
” >
width
:70 </td>
px @endif
” <td>
>< {!!
i
Form
class ::
= open
” ([
fa ’
method
fa ’
−
archive =>
”
></ ’
i DELETE
> ’
,
Archive
’
</ route
a ’
>
=>
</td>
@endif [
@if ( ’
$proj projects
−> .
isActive destroy
() ’
) ,
<td>
<a $proj
−>
href id
= ],
”
{{ ’
o ns u b mi t
route ’
(’
projects =>
.
tag ’
’, return
174
@extends
confirm ( ’ l a y o u t s / master ’ )
( ”s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
@
@
D se el ec t ei o n ( ’ c o n t e n t ’ )
<d i v c l a s s=” row ”>
p r o j<d e c ti v c l a s s=” c o l −md−12”>
<d i v c l a s s=” x p a n e l ”>
’ <d i v c l a s s=” x t i t l e ”>
. <h2> P r o j e c t I n f o r m a t i o n </h2>
<u l c l a s s=” nav navbar−r i g h t
$proj p a n e l t o o l b o x ”>
−> < l i ><a c l a s s=” c o l l a p s e −
proj name l i n k ”><i c l a s s=” f a f a
−c h e v r o n−up”></i ></a>
. </ l i >
’ < l i c l a s s=” dropdown ”>
<a h r e f=”#” c l a s s=”
permanently dropdown−t o g g l e ”
?”) data−t o g g l e=”
’ dropdown ” r o l e=”
]) button ” aria −
expanded=” f a l s e ”
!!} ><i c l a s s=” f a f a −
wrench ”></i ></a>
{!! <u l c l a s s=” dropdown−
menu” r o l e=”menu”
Form >
:: < l i ><a h r e f=”#”>
submit S e t t i n g s 1</a
( >
’ </ l i >
Delete < l i ><a h r e f=”#”>
’ S e t t i n g s 2</a
, >
</ l i >
[ </u l >
’ </ l i >
class </u l >
’ <d i v c l a s s=” c l e a r f i x ”></d i v>
</d i v>
=> <d i v c l a s s=” x c o n t e n t ”>
<!−− p r o j e c t image −−>
’ <d i v c l a s s=” c o l −md−3 c o l −sm−3
btn c o l −xs −12 p r o f i l e l e f t ”>
<d i v c l a s s=” p r o f i l e i m g ”>
btn <!−− end o f image
− c r o p p i n g −−>
danger <d i v i d=” c r o p−a v a t a r ”>
<!−− C u r r e n t
btn a v a t a r −−>
− <d i v c l a s s=” a v a t a r
xs −v i e w ” t i t l e =
’ ” Change t h e
, a v a t a r ”>
<img s r c=” {{
’ URL : :
style asset (
’ $project
−>
=> proj image
) }} ” a l t=
’ ” Avatar ”>
width </d i v>
:70 <!−− C r o p p i n g
px modal −−>
’ <d i v c l a s s=” modal
]) f a d e ” i d=”
a v a t a r −modal ”
!!} a r i a −h i d d e n=
” true ” aria−
{!! l a b e l l e d b y=”
a v a t a r −modal−
Form l a b e l ” r o l e=”
:: dialog ”
close t a b i n d e x=”−1”
() >
<d i v c l a s s=”
!!} modal−
dialog
</td> modal−l g ”
</t r > >
</ t a b l e > <d i v c l a s s
</td> =”
</t r > modal
@endforeach −
</tbody> content
</ t a b l e > ”>
@endif <form
<d i v c l a s s=” l n s o l i d ”></d i v> class
</d i v> =
</d i v> ”
</d i v> avatar
</d i v> −
<!−− / a l l p r o j e c t s −−> form
@endsection ”
action
=
”
Listing 100: projects/show.blade.php crop
175
. −
php body
” ”
>
enctype
= <
” div
multipart
/ class
form =
− ”
data avatar
” −
body
method ”
= >
”
post <!−−
”
> Upload
<
div image
class and
=
” data
modal
− −−>
header
” <
> div
< class
button =
”
class avatar
= −
” upload
close ”
” >
data <
− inp
dismiss
= cla
” =
modal ”
” av
−
type src
= ”
”
button nam
” =
>& ”
times av
; </ ”
button
> typ
=
< ”
h4 hid
”
class >
=
” <
modal inp
−
title cla
” =
”
id av
= −
” da
avatar ”
−
modal nam
− =
label ”
” av
> ”
Change
typ
Image =
</ ”
h4 hid
> ”
>
</
div <
> lab
< for
div =
”
class av
= ”
” >
modal Lo
176
md
upload −3
</ ”
label >
>
<
<
input
class
=
”
avatar
−
input
”
id
=
”
avatarInput
”
name <
=
”
avatar file
”
type
=
”
file
”
>
</
div
>
<!−−
</
Crop div
>
and
</
preview div
>
−−>
<
< div
div
class
class =
= ”
” row
row
” avatar
> −
btns
< ”
div >
class <
= div
”
col cla
− =
md ”
−9 co
” −
> md
−9
< ”
div >
class <
=
”
avatar
−
wrapper
”
></
div
>
</
div
>
<
div
class
=
”
col
−
177
”
data
−
method
=
”
rotate
”
data
−
option
=
”
−90
”
type
=
”
button
”
title
=
”
Rotate
−90
degrees
”
>
Rotate
Left
</
button
>
<
button
class
=
”
btn
btn
−
primary
”
data
−
method
=
”
rotate
”
data </
−
option
=
” <
−15
”
type
=
”
button
”
>−15
deg
</
button
>
<
button
class
=
”
btn
btn
−
primary
”
data
−
method
=
”
178
data
−
option
=
”
90
”
type
=
”
button
”
title
=
”
Rotate
90
degrees
”
>
Rotate
Right
</
button
>
<
button
class
=
”
btn
btn
−
primary
”
data
−
method
=
”
rotate
”
data </
−
option
=
” </
15 div
” >
type <
= div
”
button cla
” =
>15 ”
deg co
</ −
button md
> −3
”
< >
button
<
class
=
”
btn
btn
−
primary
”
data
−
method
=
”
rotate
”
data
−
option
=
”
30
”
179
>
</d i v>
Done / p r o j e c t image −−>
<!−−
<!−−
</ p r o j e c t i n f o −−>
<d i v c l a s s=” c o l −md−9 c o l −sm−9
button
> c o l −xs −12”>
<d i v c l a s s=” ” r o l e=”
</ t a b p a n e l ” data−
div example−i d=” t o g g l a b l e
> −t a b s ”>
<u l i d=”myTab” c l a s s=”
</ nav nav−t a b s
div b a r t a b s ” r o l e=”
> t a b l i s t ”>
< l i r o l e=”
</ presentation ”
div c l a s s=”
> a c t i v e ”><a
h r e f=”#
</ tab content1 ”
div r o l e=” t a b ”
> i d=”home−t a b ”
data−t o g g l e=
</form ” tab ” a r i a −
> expanded=”
</d i v> f a l s e ”>
</d i v> Project
</d i v> D e t a i l s </a>
<!−− / . modal −−> </ l i >
<!−− L o a d i n g s t a t e </u l >
−−> <d i v i d=” myTabContent ”
<d i v c l a s s=” c l a s s=” tab−
loading ” aria c o n t e n t ”>
−l a b e l=” <!−− p r o j e c t
Loading ” r o l e d e t a i l s −−>
=” img ” <d i v r o l e=”
t a b i n d e x=”−1” tabpanel ”
></d i v> c l a s s=” tab−
</d i v> pane f a d e
<!−− end o f image active in ” id
c r o p p i n g −−> =”
</d i v> tab content1 ”
<b r /> aria−
<a h r e f=” {{ r o u t e ( ’ l a b e l l e d b y=”
projects . home−t a b ”>
viewCompiledReport ’ , <d i v c l a s s=”
$ p r o j e c t −>i d ) }} ” c o l −md−5
c l a s s=” btn btn− c o l −md−5
p r i m a r y btn−sm” s t y l e c o l −xs −12
=” w i d t h : 2 2 0 px ”><i ”>
c l a s s=” f a f a −e y e m− <d i v c l a s s
r i g h t −x s ”></i > View =”
Compiled R e p o r t </a> project detail
@ i f ( $ p r o j e c t −>i s A c t i v e ( ) ) ”>
<a h r e f=” {{ r o u t e ( ’ <p
projects . edit ’ , class
$ p r o j e c t −>i d ) }} ” =
c l a s s=” btn btn−i n f o ”
btn−sm” s t y l e=” w i d t h title
: 1 5 0 px ”><i c l a s s=” f a ”
f a −e d i t m−r i g h t −x s ” >
></i > E d i t P r o j e c t Client
D e t a i l s </a> </
<a h r e f=” {{ r o u t e ( ’ p
p r o j e c t s . tag ’ , >
$ p r o j e c t −>i d ) }} ” <p>{{
c l a s s=” btn btn− $project
w a r n i n g btn−sm” s t y l e −>
=” w i d t h : 6 5 px ”><i proj client
c l a s s=” f a f a −t a g m−
r i g h t −x s ”></i > Tag </ }}</
a> p
@ e l s e i f ( $ p r o j e c t −>i s T a g g e d >
() ) <p
<a h r e f=” {{ r o u t e ( ’ e m a i l s . class
c r e a t e ’ , $ p r o j e c t −>i d =
) }} ” c l a s s=” btn btn− ”
p r i m a r y btn−sm” s t y l e title
=” w i d t h : 2 2 0 px ”><i ”
c l a s s=” f a f a −s e n d m− >
r i g h t −x s ”></i > C r e a t e Location
Email </a> </
<a h r e f=” {{ r o u t e ( ’ p
projects . edit ’ , >
$ p r o j e c t −>i d ) }} ” <p>{{
c l a s s=” btn btn−i n f o $project
btn−sm” s t y l e=” w i d t h −>
: 1 4 0 px ”><i c l a s s=” f a proj location
f a −e d i t m−r i g h t −x s ”
></i > E d i t P r o j e c t }}</
D e t a i l s </a> p
<a h r e f=” {{ r o u t e ( ’ >
projects . archive ’ , @if (
$ p r o j e c t −>i d ) }} ” strlen
c l a s s=” btn btn−d a r k (
btn−sm” s t y l e=” w i d t h trim
: 7 5 px ”><i c l a s s=” f a (
f a −a r c h i v e m−r i g h t −x s $project
”></i > A r c h i v e </a> −>
@endif proj description
180
) users
) .
show
> ’,
0) $engr
−>
<p id
class )
=
” }}
title ”
”
> class
Description =
</ ”
p btn
>
<p>{{ btn
$project −
−> link
proj description
btn
}}</ −
p xs
> ”
@endif ><
<p i
class
= class
” =
title ”
” fa
>
Project fa
−
Members user
</
p m
> −
<u l right
style −
= xs
” ”
list ></
− i
style >
−
type {{
:
$engr
none −>
; firstname
padding .
−
left ”
:0;
” ”
>
<? .
php
$engr
$engineers −>
lastname
=
}}
Helper
:: </
getEngineers a
( ></
$project li
−> >
id
) @endforeach
181
</d i v> ’ w i d t h : 7 0 px ’
</d i v> ]) !!}
</d i v> { ! ! Form : : c l o s e ( )
<d i v c l a s s=” row ”> !!}
<!−− b o r e h o l e s −−> </td>
<d i v c l a s s=” c o l −md−6 c o l −sm−6 c o l −xs −12”> </t r >
<d i v c l a s s=” x p a n e l ”> @endforeach
<d i v c l a s s=” x t i t l e ”> </ t a b l e >
<h2> B o r e h o l e s </h2> @else
<u l c l a s s=” nav navbar−r i g h t <c e n t e r >
p a n e l t o o l b o x ”> <h2>T h i s p r o j e c t c u r r e n t l y
< l i ><a c l a s s=” c o l l a p s e − h a s no b o r e h o l e s . </
l i n k ”><i c l a s s=” f a f a h2>
−c h e v r o n−up”></i ></a> </ c e n t e r >
</ l i > @endif
< l i c l a s s=” dropdown ”> <d i v c l a s s=” l n s o l i d ”></d i v>
<a h r e f=”#” c l a s s=” @ i f ( ! $ p r o j e c t −>i s A r c h i v e d ( ) )
dropdown−t o g g l e ” <a h r e f=” {{ r o u t e ( ’ b o r e h o l e s .
data−t o g g l e=” c r e a t e ’ , $ p r o j e c t −>i d ) }}
dropdown ” r o l e=” ” c l a s s=” btn btn−p r i m a r y ”
button ” aria − s t y l e=” f l o a t : r i g h t ”><i
expanded=” f a l s e ” c l a s s=” f a f a −p l u s m−r i g h t
><i c l a s s=” f a f a − −x s ”></i > Add B o r e h o l e </
wrench ”></i ></a> a>
<u l c l a s s=” dropdown− @endif
menu” r o l e=”menu” </d i v>
> </d i v>
< l i ><a h r e f=”#”> </d i v>
S e t t i n g s 1</a <!−− / b o r e h o l e s −−>
> <!−− s o i l b e a r i n g c a p a c i t i e s −−>
</ l i > <d i v c l a s s=” c o l −md−6 c o l −sm−6 c o l −xs −12”>
< l i ><a h r e f=”#”> <d i v c l a s s=” x p a n e l ”>
S e t t i n g s 2</a <d i v c l a s s=” x t i t l e ”>
> <h2> SBC f o r F o u n d a t i o n s </h2>
</ l i > <u l c l a s s=” nav navbar−r i g h t
</u l > p a n e l t o o l b o x ”>
</ l i > < l i ><a c l a s s=” c o l l a p s e −
< l i ><a c l a s s=” c l o s e −l i n k ” l i n k ”><i c l a s s=” f a f a
><i c l a s s=” f a f a − −c h e v r o n−up”></i ></a>
c l o s e ”></i ></a> </ l i >
</ l i > < l i c l a s s=” dropdown ”>
</u l > <a h r e f=”#” c l a s s=”
<d i v c l a s s=” c l e a r f i x ”></d i v> dropdown−t o g g l e ”
</d i v> data−t o g g l e=”
<d i v c l a s s=” x c o n t e n t ”> dropdown ” r o l e=”
@if ( sizeof ( $boreholes ) > 0) button ” aria −
<t a b l e c l a s s=” t a b l e t a b l e − expanded=” f a l s e ”
s t r i p e d t a b l e −h o v e r ” ><i c l a s s=” f a f a −
c e l l p a d d i n g=” 10 ”> wrench ”></i ></a>
@ f o r e a c h ( $ b o r e h o l e s a s $bh <u l c l a s s=” dropdown−
) menu” r o l e=”menu”
<t r > >
<td>B o r e h o l e {{ $bh−> < l i ><a h r e f=”#”>
bh num }} <s m a l l S e t t i n g s 1</a
>(ID# {{ $ b h−>i d >
} } )</ s m a l l ></t d > </ l i >
<td>w/ {{ $bh−> < l i ><a h r e f=”#”>
bh num of samples S e t t i n g s 2</a
}} s a m p l e s </td> >
<td><a h r e f=” {{ r o u t e </ l i >
( ’ b o r e h o l e s . show </u l >
’ , $bh−>i d ) }} ” </ l i >
c l a s s=” btn btn− < l i ><a c l a s s=” c l o s e −l i n k ”
p r i m a r y btn−x s ” ><i c l a s s=” f a f a −
s t y l e=” w i d t h : 7 0 px c l o s e ”></i ></a>
”><i c l a s s=” f a f a </ l i >
−e y e ”></i > View </u l >
</a></td> <d i v c l a s s=” c l e a r f i x ”></d i v>
<td><a h r e f=” {{ r o u t e </d i v>
( ’ boreholes . edit <d i v c l a s s=” x c o n t e n t ”>
’ , $bh−>i d ) }} ” @ i f ( Auth : : u s e r ( )−>isAdmin ( ) &&
c l a s s=” btn btn− ! $ p r o j e c t −>i s A r c h i v e d ( ) )
i n f o btn−x s ” <h4>Compute SBC f o r t h e
s t y l e=” w i d t h : 7 0 px f o l l o w i n g f o u n d a t i o n s : </
”><i c l a s s=” f a f a h4>
−p e n c i l ”></i > <t a b l e c l a s s=” t a b l e t a b l e −
E d i t </a></td> s t r i p e d t a b l e −h o v e r ”
<td> c e l l p a d d i n g=” 10 ”>
{ ! ! Form : : open ( [ ’ <t r >
method ’ => ’ <td>S h a l l o w Foundation
DELETE ’ , ’ </td>
r o u t e ’ => [ ’ @if ( sizeof ( $shallows )
boreholes . > 0)
d e s t r o y ’ , $bh <td><a h r e f=” {{ r o u t e
−>i d ] , ’ ( ’ shallows . index
o ns u b mi t ’ => ’ , $ p r o j e c t −>i d )
’ return }} ” c l a s s=” btn
confirm (” btn−p r i m a r y btn−
Delete x s ” s t y l e=” w i d t h
borehole ’ . : 7 0 px ”><i c l a s s=”
$bh−>bh num . f a f a −e y e ”></i >
’ permanently View </a></td>
?”) ’ ] ) ! ! } <td><a h r e f=” {{ r o u t e
{ ! ! Form : : s u b m i t ( ’ ( ’ shallows . edit ’ ,
Delete ’ , [ ’ $ p r o j e c t −>i d ) }}
c l a s s ’ => ’ ” c l a s s=” btn btn−
btn btn− i n f o btn−x s ”
d a n g e r btn−x s s t y l e=” w i d t h : 7 0 px
’ , ’ s t y l e ’ => ”><i c l a s s=” f a f a
182
−p e n c i l ”></i > <td><a h r e f=” {{ r o u t e
E d i t </a></td> ( ’ deeps . c r e a t e ’ ,
<td> $ p r o j e c t −>i d ) }} ”
{ ! ! Form : : open ( [ ’ c l a s s=” btn btn−
method ’ => ’ p r i m a r y btn−x s ”
DELETE ’ , ’ s t y l e=” w i d t h : 7 0 px
r o u t e ’ => [ ’ ”><i c l a s s=” f a f a
shallows . −p l u s m−r i g h t −x s ”
destroy ’ , ></i > Compute </a
$ p r o j e c t −>i d ></td>
] , ’ o ns u b mi t ’ <td></td>
=> ’ r e t u r n <td></td>
confirm (” <td></td>
D e l e t e SBC @endif
data f o r </t r >
shallow <t r >
foundation <td>D r i l l e d S h a f t
permanently Foundation </td>
?”) ’ ] ) ! ! } @if ( sizeof (
{ ! ! Form : : s u b m i t ( ’ $drilled shafts )
Delete ’ , [ ’ > 0)
c l a s s ’ => ’ <td><a h r e f=” {{ r o u t e
btn btn− ( ’ drilledshafts .
d a n g e r btn−x s index ’ , $project
’ , ’ s t y l e ’ => −>i d ) }} ” c l a s s=”
’ w i d t h : 7 0 px ’ btn btn−p r i m a r y
]) !!} btn−x s ” s t y l e=”
{ ! ! Form : : c l o s e ( ) w i d t h : 7 0 px ”><i
!!} c l a s s=” f a f a −e y e ”
</td> ></i > View </a></
<td></td> td>
@else <td><a h r e f=” {{ r o u t e
<td><a h r e f=” {{ r o u t e ( ’ drilledshafts .
( ’ shallows . create e d i t ’ , $ p r o j e c t −>
’ , $ p r o j e c t −>i d ) i d ) }} ” c l a s s=”
}} ” c l a s s=” btn btn btn−i n f o btn−
btn−p r i m a r y btn− xs ” s t y l e=”
x s ” s t y l e=” w i d t h w i d t h : 7 0 px ”><i
: 7 0 px ”><i c l a s s=” c l a s s=” f a f a −
f a f a −p l u s m− p e n c i l ”></i > E d i t
r i g h t −x s ”></i > </a></td>
Compute </a></td> <td>
<td></td> { ! ! Form : : open ( [ ’
<td></td> method ’ => ’
<td></td> DELETE ’ , ’
@endif r o u t e ’ => [ ’
</t r > drilledshafts
<t r > . destroy ’ ,
<td>Deep Foundation </ $ p r o j e c t −>i d
td> ] , ’ o ns u b mi t ’
@if ( sizeof ( $deeps ) > => ’ r e t u r n
0) confirm (”
<td><a h r e f=” {{ r o u t e D e l e t e SBC
( ’ deeps . index ’ , data f o r
$ p r o j e c t −>i d ) }} ” drilled shaft
c l a s s=” btn btn− foundation
p r i m a r y btn−x s ” permanently
s t y l e=” w i d t h : 7 0 px ?”) ’ ] ) ! ! }
”><i c l a s s=” f a f a { ! ! Form : : s u b m i t ( ’
−e y e ”></i > View Delete ’ , [ ’
</a></td> c l a s s ’ => ’
<td><a h r e f=” {{ r o u t e btn btn−
( ’ deeps . e d i t ’ , d a n g e r btn−x s
$ p r o j e c t −>i d ) }} ” ’ , ’ s t y l e ’ =>
c l a s s=” btn btn− ’ w i d t h : 7 0 px ’
i n f o btn−x s ” ]) !!}
s t y l e=” w i d t h : 7 0 px { ! ! Form : : c l o s e ( )
”><i c l a s s=” f a f a !!}
−p e n c i l ”></i > </td>
E d i t </a></td> <td></td>
<td> @else
{ ! ! Form : : open ( [ ’ <td><a h r e f=” {{ r o u t e
method ’ => ’ ( ’ drilledshafts .
DELETE ’ , ’ create ’ , $project
r o u t e ’ => [ ’ −>i d ) }} ” c l a s s=”
deeps . destroy btn btn−p r i m a r y
’ , $ p r o j e c t −> btn−x s ” s t y l e=”
id ] , ’ w i d t h : 7 0 px ”><i
o ns u b mi t ’ => c l a s s=” f a f a −p l u s
’ return m−r i g h t −x s ”></i >
confirm (” Compute </a></td
D e l e t e SBC >
d a t a f o r deep <td></td>
foundation <td></td>
permanently <td></td>
?”) ’ ] ) ! ! } @endif
{ ! ! Form : : s u b m i t ( ’ </t r >
Delete ’ , [ ’ </ t a b l e >
c l a s s ’ => ’ @else
btn btn− <c e n t e r >
d a n g e r btn−x s <h2>You a r e n o t p e r m i t t e d
’ , ’ s t y l e ’ => to modify t h i s
’ w i d t h : 7 0 px ’ r e s o u r c e . </h2>
]) !!} </ c e n t e r >
{ ! ! Form : : c l o s e ( ) @endif
!!} <d i v c l a s s=” l n s o l i d ”></d i v>
</td> </d i v>
<td></td> </d i v>
@else </d i v>
183
<!−− / s o i l b e a r i n g c a p a c i t i e s −−> )
</d i v> ;
<d i v c l a s s=” row ”>
<!−− r e p o r t s e c t i o n s −−> $ a r r = range ( 0 , 8 ) ;
<d i v c l a s s=” c o l −md−6 c o l −sm−6 c o l −xs −12”> ?>
<d i v c l a s s=” x p a n e l ”> @if ( sizeof ( $ s e c t i o n s ) > 0)
<d i v c l a s s=” x t i t l e ”> <?php $ c t r 2 = −1; ?>
<h2> R e p o r t S e c t i o n s </h2> @foreach ( $ s e c t i o n s as $ s e c t i o n
<u l c l a s s=” nav navbar−r i g h t )
p a n e l t o o l b o x ”> <?php
< l i ><a c l a s s=” c o l l a p s e − $ c t r 2 ++;
l i n k ”><i c l a s s=” f a f a $temp array [ $ctr2 ] =
−c h e v r o n−up”></i ></a> $ s e c t i o n −>s e c t i o n k e y
</ l i > . ” | ” . $ s e c t i o n −>i d
< l i c l a s s=” dropdown ”> ;
<a h r e f=”#” c l a s s=” ?>
dropdown−t o g g l e ” @endforeach
data−t o g g l e=” <?php s o r t ( $ t e m p a r r a y ) ?>
dropdown ” r o l e=” <t a b l e c l a s s=” t a b l e t a b l e −
button ” aria − s t r i p e d t a b l e −h o v e r ”
expanded=” f a l s e ” c e l l p a d d i n g=” 10 ”>
><i c l a s s=” f a f a − @ f o r ( $x = 0 ; $x < s i z e o f (
wrench ”></i ></a> $ t e m p a r r a y ) ; $x++)
<u l c l a s s=” dropdown− <?php $ e x p l o d e d s e c t i o n =
menu” r o l e=”menu” explode ( ” | ” ,
> $ t e m p a r r a y [ $x ] ) ; ?>
< l i ><a h r e f=”#”> <t r >
S e t t i n g s 1</a <td >{{ $ s e c t i o n l i s t [
> $exploded section
</ l i > [ 0 ] ] }}</td>
< l i ><a h r e f=”#”> <td><a h r e f=” {{ r o u t e
S e t t i n g s 2</a ( ’ s e c t i o n s . show ’ ,
>
</ l i > $exploded section
</u l > [ 1 ] ) }} ” c l a s s=”
</ l i > btn btn−p r i m a r y
< l i ><a c l a s s=” c l o s e −l i n k ” btn−x s ” s t y l e=”
><i c l a s s=” f a f a − w i d t h : 7 0 px ”><i
c l o s e ”></i ></a> c l a s s=” f a f a −e y e ”
</ l i > ></i > View </a></
</u l > td>
<d i v c l a s s=” c l e a r f i x ”></d i v> <td><a h r e f=” {{ r o u t e
</d i v> ( ’ sections . edit ’ ,
<d i v c l a s s=” x c o n t e n t ”>
<?php $exploded section
$ s e c t i o n l i s t = array ( ” [ 1 ] ) }} ” c l a s s=”
T i t l e Page ” , btn btn−i n f o btn−
” x s ” s t y l e=” w i d t h
Introduction : 7 0 px ”><i c l a s s=”
” f a f a −p e n c i l ”></i
, > E d i t </a></td>
<td>
” { ! ! Form : : open ( [ ’
Drilling method ’ => ’
DELETE ’ , ’
Procedure r o u t e ’ => [ ’
” sections .
, destroy ’ ,
$exploded section
” [1]] , ’
Laboratory o ns u b mi t ’ =>
’ return
Test confirm (”
” Delete
, section ’ .
$section list
” [
Site $exploded section
[0]] . ’
Geology permanently
” ?”) ’ ] ) ! ! }
, { ! ! Form : : s u b m i t ( ’
Delete ’ , [ ’
” c l a s s ’ => ’
Findings btn btn−
” d a n g e r btn−x s
, ’ , ’ s t y l e ’ =>
’ w i d t h : 7 0 px ’
” ]) !!}
Conclusions { ! ! Form : : c l o s e ( )
!!}
and </td>
<td></td>
Recommendations </t r >
” @if ( $exploded section [ 0 ]
, != 8 )
<?php $ a r r [
” $exploded section [ 0 ] ]
Limitations = −1 ?>
/ @endif
Comments @endfor
” </ t a b l e >
, @else
<c e n t e r >
” <h2>T h i s p r o j e c t c u r r e n t l y
Other h a s no r e p o r t
s e c t i o n s . </h2>
Section </ c e n t e r >
” @endif
184
<?php // p r i n t r ( $ a r r ) ?> && $ p r o j e c t −>i s A r c h i v e d ( )
<d i v c l a s s=” l n s o l i d ”></d i v> )
@ i f ( ! $ p r o j e c t −>i s A r c h i v e d ( ) ) <c e n t e r >
@for ( $ i = 0 , $ j = 0 ; $ i < <h2>T h i s p r o j e c t h a s no
s i z e o f ( $ a r r ) ; $ i ++) s u b r e p o r t s . </h2>
@ i f ( $ a r r [ $ i ] !== −1) </ c e n t e r >
<?php @else
$section name [ <t a b l e c l a s s=” t a b l e t a b l e −
$ s e c t i o n l i s t [ $i ] ] = s t r i p e d t a b l e −h o v e r ”
$ s e c t i o n l i s t [ $i ] ; c e l l p a d d i n g=” 10 ”>
$ j ++; <t r >
?> <td>G r ai n S i z e
@endif A n a l y s i s </td>
@endfor @ i f ( $ s u b r e p o r t s −>
<?php // p r i n t r ( $ s e c t i o n n a m e ) contains ( ’ sb key ’
?> , 0) )
<h4 s t y l e=” t e x t −a l i g n : r i g h t ”> <?php $ s u b r e p o r t =
Add</h4> $ s u b r e p o r t s −>
{ ! ! Form : : open ( array ( ’ r o u t e ’ where ( ’ s b k e y ’ ,
=> ’ s e c t i o n s . c r e a t e ’ ) ) 0 )−> f i r s t ( ) ?>
!!} <td><a h r e f=” {{ r o u t e
{ ! ! Form : : h i d d e n ( ’ p r o j i d ’ , ( ’ datapoints .
$ p r o j e c t −>i d ) ! ! } index ’ , $project
<d i v c l a s s=” c o l −sm−9” s t y l e=” −>i d ) }} ” c l a s s=”
f l o a t : r i g h t ”> btn btn−p r i m a r y
<d i v c l a s s=” i n p u t −g r o u p ”> btn−x s ” s t y l e=”
{ ! ! Form : : s e l e c t ( ’ w i d t h : 7 0 px ”><i
section name ’ , c l a s s=” f a f a −e y e ”
$section name , ></i > P o i n t s </a
old ( ’ section name ></td>
’ ) , array ( ’ c l a s s ’ <td><a h r e f=” {{ r o u t e
=> ’ btn btn− ( ’ subreports .
default ’ , ’ showGSA ’ ,
p l a c e h o l d e r ’ => ’ $ s u b r e p o r t −>i d )
Choose a s e c t i o n }} ” c l a s s=” btn
t o add . . . ’ , ’ btn−p r i m a r y btn−
r e q u i r e d ’ => ’ x s ” s t y l e=” w i d t h
t r u e ’ , ’ s t y l e ’ => : 7 0 px ”><i c l a s s=”
’ float : right ’ ) ) f a f a −e y e ”></i >
!!} View </a></td>
<span c l a s s=” i n p u t − <td><a h r e f=” {{ r o u t e
group−btn ”> ( ’ datapoints . edit
{ ! ! Form : : s u b m i t ( ’ ’ , $ p r o j e c t −>i d )
Submit ’ , [ ’ c l a s s ’ }} ” c l a s s=” btn
=> ’ btn btn− btn−i n f o btn−x s ”
primary ’ , ’ s t y l e ’ s t y l e=” w i d t h : 7 0 px
=> ’ f l o a t : r i g h t ’ ”><i c l a s s=” f a f a
]) !!} −p e n c i l ”></i >
</span> E d i t </a></td>
</d i v> <td>
</d i v> { ! ! Form : : open ( [ ’
{ ! ! Form : : c l o s e ( ) ! ! } method ’ => ’
@endif DELETE ’ , ’
</d i v> r o u t e ’ => [ ’
</d i v> datapoints .
</d i v> destroy ’ ,
<!−− / r e p o r t s e c t i o n s −−> $ s u b r e p o r t −>
<!−− s u b r e p o r t s −−> id ] , ’
<d i v c l a s s=” c o l −md−6 c o l −sm−6 c o l −xs −12”> o ns u b mi t ’ =>
<d i v c l a s s=” x p a n e l ”> ’ return
<d i v c l a s s=” x t i t l e ”> confirm (”
<h2> S u b r e p o r t s </h2> Delete grain
<u l c l a s s=” nav navbar−r i g h t size analysis
p a n e l t o o l b o x ”> permanently
< l i ><a c l a s s=” c o l l a p s e − ?”) ’ ] ) ! ! }
l i n k ”><i c l a s s=” f a f a { ! ! Form : : s u b m i t ( ’
−c h e v r o n−up”></i ></a> Delete ’ , [ ’
</ l i > c l a s s ’ => ’
< l i c l a s s=” dropdown ”> btn btn−
<a h r e f=”#” c l a s s=” d a n g e r btn−x s
dropdown−t o g g l e ” ’ , ’ s t y l e ’ =>
data−t o g g l e=” ’ w i d t h : 7 0 px ’
dropdown ” r o l e=” ]) !!}
button ” aria − { ! ! Form : : c l o s e ( )
expanded=” f a l s e ” !!}
><i c l a s s=” f a f a − </td>
wrench ”></i ></a> @else
<u l c l a s s=” dropdown− <td><a h r e f=” {{ r o u t e
menu” r o l e=”menu” ( ’ datapoints .
> create ’ , $project
< l i ><a h r e f=”#”> −>i d ) }} ” c l a s s=”
S e t t i n g s 1</a btn btn−p r i m a r y
> btn−x s ” s t y l e=”
</ l i > w i d t h : 7 0 px ”><i
< l i ><a h r e f=”#”> c l a s s=” f a f a −p l u s
S e t t i n g s 2</a m−r i g h t −x s ”></i >
> C r e a t e </a></td>
</ l i > <td></td>
</u l > <td></td>
</ l i > <td></td>
< l i ><a c l a s s=” c l o s e −l i n k ” <td></td>
><i c l a s s=” f a f a − @endif
c l o s e ”></i ></a> </t r >
</ l i > <t r >
</u l > <td>L i q u i d and P l a s t i c
<d i v c l a s s=” c l e a r f i x ”></d i v> Limits Test
</d i v> Report </td>
<d i v c l a s s=” x c o n t e n t ”> @ i f ( $ s u b r e p o r t s −>
@ i f ( s i z e o f ( $ s u b r e p o r t s ) == 0 contains ( ’ sb key ’
185
, 1) ) <td><a h r e f=” {{ r o u t e
<?php $ s u b r e p o r t = ( ’ subreports .
$ s u b r e p o r t s −> createBL ’ ,
where ( ’ s b k e y ’ , $ p r o j e c t −>i d ) }} ”
1 )−> f i r s t ( ) ?> c l a s s=” btn btn−
<td><a h r e f=” {{ r o u t e i n f o btn−x s ”
( ’ l i m i t s . index ’ , s t y l e=” w i d t h : 7 0 px
$ p r o j e c t −>i d ) }} ” ”><i c l a s s=” f a f a
c l a s s=” btn btn− −p e n c i l ”></i >
p r i m a r y btn−x s ” Update </a></td>
s t y l e=” w i d t h : 7 0 px <td>
”><i c l a s s=” f a f a { ! ! Form : : open ( [ ’
−e y e ”></i > L i m i t s method ’ => ’
</a></td> DELETE ’ , ’
<td><a h r e f=” {{ r o u t e r o u t e ’ => [ ’
( ’ subreports . subreports .
showLPTR ’ , destroy ’ ,
$ s u b r e p o r t −>i d ) $ s u b r e p o r t −>
}} ” c l a s s=” btn id ] , ’
btn−p r i m a r y btn− o ns u b mi t ’ =>
x s ” s t y l e=” w i d t h ’ return
: 7 0 px ”><i c l a s s=” confirm (”
f a f a −e y e ”></i > Delete
View </a></td> borehole log
<td><a h r e f=” {{ r o u t e report
( ’ limits . edit ’ , permanently
$ p r o j e c t −>i d ) }} ” ?”) ’ ] ) ! ! }
c l a s s=” btn btn− { ! ! Form : : s u b m i t ( ’
i n f o btn−x s ” Delete ’ , [ ’
s t y l e=” w i d t h : 7 0 px c l a s s ’ => ’
”><i c l a s s=” f a f a btn btn−
−p e n c i l ”></i > d a n g e r btn−x s
E d i t </a></td> ’ , ’ s t y l e ’ =>
<td> ’ w i d t h : 7 0 px ’
{ ! ! Form : : open ( [ ’ ]) !!}
method ’ => ’ { ! ! Form : : c l o s e ( )
DELETE ’ , ’ !!}
r o u t e ’ => [ ’ </td>
limits . @else
destroy ’ , <td><a h r e f=” {{ r o u t e
$ s u b r e p o r t −> ( ’ subreports .
id ] , ’ createBL ’ ,
o ns u b mi t ’ => $ p r o j e c t −>i d ) }} ”
’ return c l a s s=” btn btn−
confirm (” p r i m a r y btn−x s ”
Delete l i q u i d s t y l e=” w i d t h : 7 0 px
and p l a s t i c ”><i c l a s s=” f a f a
limits test −p l u s m−r i g h t −x s ”
report ></i > C r e a t e </a
permanently ></td>
?”) ’ ] ) ! ! } <td></td>
{ ! ! Form : : s u b m i t ( ’ <td></td>
Delete ’ , [ ’ <td></td>
c l a s s ’ => ’ <td></td>
btn btn− @endif
d a n g e r btn−x s </t r >
’ , ’ s t y l e ’ => <t r >
’ w i d t h : 7 0 px ’ <td>S o i l P r o f i l e </td>
]) !!} @ i f ( $ s u b r e p o r t s −>
{ ! ! Form : : c l o s e ( ) contains ( ’ sb key ’
!!} , 3) )
</td> <?php $ s u b r e p o r t =
@else $ s u b r e p o r t s −>
<td><a h r e f=” {{ r o u t e where ( ’ s b k e y ’ ,
( ’ limits . create ’ , 3 )−> f i r s t ( ) ?>
$ p r o j e c t −>i d ) }} <td></td>
” c l a s s=” btn btn− <td><a h r e f=” {{ r o u t e
p r i m a r y btn−x s ” ( ’ subreports .
s t y l e=” w i d t h : 7 0 px showSP ’ ,
”><i c l a s s=” f a f a $ s u b r e p o r t −>i d )
−p l u s m−r i g h t −x s ” }} ” c l a s s=” btn
></i > C r e a t e </a btn−p r i m a r y btn−
></td> x s ” s t y l e=” w i d t h
<td></td> : 7 0 px ”><i c l a s s=”
<td></td> f a f a −e y e ”></i >
<td></td> View </a></td>
<td></td> <td><a h r e f=” {{ r o u t e
@endif ( ’ subreports .
</t r > createSP ’ ,
<t r > $ p r o j e c t −>i d ) }} ”
<td>B o r e h o l e Log</td> c l a s s=” btn btn−
@ i f ( $ s u b r e p o r t s −> i n f o btn−x s ”
contains ( ’ sb key ’ s t y l e=” w i d t h : 7 0 px
, 2) ) ”><i c l a s s=” f a f a
<?php $ s u b r e p o r t = −p e n c i l ”></i >
$ s u b r e p o r t s −> Update </a></td>
where ( ’ s b k e y ’ , <td>
2 )−> f i r s t ( ) ?> { ! ! Form : : open ( [ ’
<td></td> method ’ => ’
<td><a h r e f=” {{ r o u t e DELETE ’ , ’
( ’ subreports . r o u t e ’ => [ ’
showBL ’ , subreports .
$ s u b r e p o r t −>i d ) destroy ’ ,
}} ” c l a s s=” btn $ s u b r e p o r t −>
btn−p r i m a r y btn− id ] , ’
x s ” s t y l e=” w i d t h o ns u b mi t ’ =>
: 7 0 px ”><i c l a s s=” ’ return
f a f a −e y e ”></i > confirm (”
View </a></td> Delete s o i l
186
profile <d i v c l a s s=” x c o n t e n t ”>
report <d i v c l a s s=” row ”>
permanently @ f o r e l s e ( $ p r o j e c t s as
?”) ’ ] ) ! ! } $proj )
{ ! ! Form : : s u b m i t ( ’ <d i v c l a s s=” c o l −md−55”>
Delete ’ , [ ’ <d i v c l a s s=” t h u m b n a i l ”
c l a s s ’ => ’ >
btn btn− <d i v c l a s s=” image
d a n g e r btn−x s v i e w view−
’ , ’ s t y l e ’ => f i r s t ”>
’ w i d t h : 7 0 px ’ <img s t y l e=”
]) !!} width :
{ ! ! Form : : c l o s e ( ) 100%;
!!} display :
</td> block ; ”
@else s r c=” {{
<td><a h r e f=” {{ r o u t e URL : :
( ’ subreports . asset (
createSP ’ , $ p r o j −>
$ p r o j e c t −>i d ) }} ” proj image
c l a s s=” btn btn− ) }} ” a l t
p r i m a r y btn−x s ” =” image ”
s t y l e=” w i d t h : 7 0 px />
”><i c l a s s=” f a f a <d i v c l a s s=”
−p l u s m−r i g h t −x s ” mask”>
></i > C r e a t e </a <p>{{
></td> $proj
<td></td> −>
<td></td> proj id
<td></td> }}</
<td></td> p>
@endif <d i v c l a s s
</t r > =”
</ t a b l e > tools
@endif
<d i v c l a s s=” l n s o l i d ”></d i v> tools
</d i v> −
</d i v> bottom
</d i v> ”>
<!−− / s u b r e p o r t s −−> <a
</d i v> href
<d i v c l a s s=” c l e a r f i x ”></d i v> =
@endsection ”
@section ( ’ j s ’ ) {{
@parent
<!−− image c r o p p i n g −−> route
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / c r o p p i n g / (’
c r o p p e r . min . j s ’ ) }} ”></ s c r i p t > projects
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / c r o p p i n g / main . .
j s ’ ) }} ”></ s c r i p t > show
@endsection ’,
$proj
−>
Listing 101: projects/viewAc- proj id
)
tive.blade.php }}
@extends ( ’ l a y o u t s / m a s t e r ’ ) ”
@section ( ’ t i t l e ’ , ’ Projects ’ ) ><
@section ( ’ content ’ ) i
<d i v c l a s s=” row ”>
<d i v c l a s s=” c o l −md−12”> class
<d i v c l a s s=” x p a n e l ”> =
<d i v c l a s s=” x t i t l e ”> ”
<h2> A c t i v e P r o j e c t s <s m a l l > fa
View and manage current
p r o j e c t s </s m a l l > </h2> fa
<u l c l a s s=” nav navbar−r i g h t −
p a n e l t o o l b o x ”> eye
< l i ><a c l a s s=” c o l l a p s e − ”
l i n k ”><i c l a s s=” f a f a ></
−c h e v r o n−up”></i ></a> i
</ l i > ></
< l i c l a s s=” dropdown ”> a
<a h r e f=”#” c l a s s=” >
dropdown−t o g g l e ” <a
data−t o g g l e=” href
dropdown ” r o l e=” =
button ” aria − ”
expanded=” f a l s e ” {{
><i c l a s s=” f a f a −
wrench ”></i ></a> route
<u l c l a s s=” dropdown− (’
menu” r o l e=”menu” projects
> .
< l i ><a h r e f=”#”> edit
S e t t i n g s 1</a ’,
>
</ l i > $proj
< l i ><a h r e f=”#”> −>
S e t t i n g s 2</a proj id
> )
</ l i >
</u l > }}
</ l i > ”
</u l > ><
<d i v c l a s s=” c l e a r f i x ”></d i v> i
</d i v>
187
class <img s t y l e=”
= width :
” 100%;
fa display :
block ; ”
fa s r c=” {{
− URL : :
pencil asset (
” $ p r o j −>
></ proj image
i ) }} ” a l t
></ =” image ”
a />
> <d i v c l a s s=”
</d i v> mask”>
</d i v> <p>{{
</d i v> $proj
<d i v c l a s s=” −>
c a p t i o n ”> proj id
<p> }}</
<c e n t e r >{{ p>
$ p r o j −> <d i v c l a s s
proj name =”
}}</ tools
center>
</p> tools
</d i v> −
</d i v> bottom
</d i v> ”>
@empty <a
<c e n t e r > href
<h2>You have no a c t i v e =
p r o j e c t s . </h2> ”
</ c e n t e r > {{
@endforelse
</d i v> route
<d i v c l a s s=” l n s o l i d ”></d i v> (’
</d i v> projects
</d i v> .
</d i v> show
</d i v> ’,
@endsection
$proj
−>
Listing 102: projects/viewAc- proj id
)
tive.blade.php }}
@extends ( ’ l a y o u t s / m a s t e r ’ ) ”
@section ( ’ t i t l e ’ , ’ Projects ’ ) ><
@section ( ’ content ’ ) i
<d i v c l a s s=” row ”>
<d i v c l a s s=” c o l −md−12”> class
<d i v c l a s s=” x p a n e l ”> =
<d i v c l a s s=” x t i t l e ”> ”
<h2> A r c h i v e d P r o j e c t s <s m a l l > fa
View a p p r o v e d ( p a s t )
p r o j e c t s </s m a l l > </h2> fa
<u l c l a s s=” nav navbar−r i g h t −
p a n e l t o o l b o x ”> eye
< l i ><a c l a s s=” c o l l a p s e − ”
l i n k ”><i c l a s s=” f a f a ></
−c h e v r o n−up”></i ></a> i
</ l i > ></
< l i c l a s s=” dropdown ”> a
<a h r e f=”#” c l a s s=” >
dropdown−t o g g l e ” </d i v>
data−t o g g l e=” </d i v>
dropdown ” r o l e=” </d i v>
button ” aria − <d i v c l a s s=”
expanded=” f a l s e ” c a p t i o n ”>
><i c l a s s=” f a f a − <p>
wrench ”></i ></a> <c e n t e r >{{
<u l c l a s s=” dropdown− $ p r o j −>
menu” r o l e=”menu” proj name
> }}</
< l i ><a h r e f=”#”> center>
S e t t i n g s 1</a </p>
> </d i v>
</ l i > </d i v>
< l i ><a h r e f=”#”> </d i v>
S e t t i n g s 2</a @empty
> <c e n t e r >
</ l i > <h2>There a r e no
</u l > archived projects
</ l i > . </h2>
</u l > </ c e n t e r >
<d i v c l a s s=” c l e a r f i x ”></d i v> @endforelse
</d i v> </d i v>
<d i v c l a s s=” x c o n t e n t ”> <d i v c l a s s=” l n s o l i d ”></d i v>
<d i v c l a s s=” row ”> </d i v>
@ f o r e l s e ( $ p r o j e c t s as </d i v>
$proj ) </d i v>
<d i v c l a s s=” c o l −md−55”> </d i v>
<d i v c l a s s=” t h u m b n a i l ” @endsection
>
<d i v c l a s s=” image
v i e w view−
f i r s t ”> Listing 103: samples/create.blade.php
188
@extends ( ’ l a y o u t s / m a s t e r ’ ) <?php
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) $from placeholder
@section ( ’ content ’ ) = ”From : ” .
<d i v c l a s s=” row ”> ( float )
<d i v c l a s s=” c o l −md−12 c o l −sm−12 c o l −xs −12” $previous sample
> −>s a m p l e t o ;
<d i v c l a s s=” x p a n e l ”> $to placeholder =
<d i v c l a s s=” x t i t l e ”> $previous sample
<h2> Add Sample </h2> −>s a m p l e t o +
<u l c l a s s=” nav navbar−r i g h t
p a n e l t o o l b o x ”> $previous sample
< l i ><a c l a s s=” c o l l a p s e − −>
l i n k ”><i c l a s s=” f a f a sample run length
−c h e v r o n−up”></i ></a> ;
</ l i > $to placeholder =
< l i c l a s s=” dropdown ”> ”From : ” .
<a h r e f=”#” c l a s s=” $to placeholder
dropdown−t o g g l e ” ;
data−t o g g l e=” $depth text = ”
dropdown ” r o l e=” Depth (m) ” ;
button ” aria − $run length default
expanded=” f a l s e ” =
><i c l a s s=” f a f a − $previous sample
wrench ”></i ></a> −>
<u l c l a s s=” dropdown− sample run length
menu” r o l e=”menu” ;
> ?>
< l i ><a h r e f=”#”> @endif
S e t t i n g s 1</a { ! ! Form : : l a b e l ( ’
> sample from ’ ,
</ l i > $depth text , [ ’
< l i ><a h r e f=”#”> c l a s s ’ => ’
S e t t i n g s 2</a c o n t r o l −l a b e l c o l
> −md−3 c o l −sm−3
</ l i > c o l −xs −12 ’ ] ) ! ! }
</u l > <d i v c l a s s=” c o l −md−3
</ l i > c o l −sm−6 c o l −xs
</u l > −12 form−g r o u p ”>
<d i v c l a s s=” c l e a r f i x ”></d i v> @if (
</d i v> $previous sample
<d i v c l a s s=” x c o n t e n t ”> == n u l l )
{ ! ! Form : : open ( [ ’ name ’ => ’ { ! ! Form : : number ( ’
s t o r e f o r m ’ , ’ method ’ => sample from ’ ,
’POST ’ , ’ r o u t e ’ => ’ old ( ’
samples . s t o r e ’ , ’ c l a s s ’ sample from ’ )
=> ’ form−h o r i z o n t a l form− , [ ’ c l a s s ’ =>
l a b e l −l e f t ’ ] ) ! ! } ’ form−
<d i v c l a s s=” c o n t a i n e r ”> control ’ , ’
<d i v c l a s s=” form−g r o u p ”> placeholder ’
<?php $ u s c s i d s = [ ] =>
?> $from placeholder
@for ( $ i = 0 ; $ i < , ’ s t e p ’ => ’
sizeof ( $uscs ) ; $i any ’ , ’
++) r e q u i r e d ’ =>
<?php $ u s c s i d s [ $ u s c s [ ’ true ’ ] ) ! ! }
$ i ]−> i d ] = $ u s c s [ @else
$ i ]−> i d ?> { ! ! Form : : number ( ’
@endfor sample from ’ ,
{ ! ! Form : : l a b e l ( ’ old ( ’
uscs id ’ , ’ Soil sample from ’ )
Classification ∗ ’ , [ ’ c l a s s ’ =>
, [ ’ c l a s s ’ => ’ ’ form−
c o n t r o l −l a b e l c o l control ’ , ’
−md−3 c o l −sm−3 placeholder ’
c o l −xs −12 ’ ] ) ! ! } =>
<d i v c l a s s=” c o l −md−3 $from placeholder
c o l −sm−6 c o l −xs , ’ s t e p ’ => ’
−12 form−g r o u p ”> any ’ ] ) ! ! }
{ ! ! Form : : s e l e c t ( ’ @endif
uscs id ’ , </d i v>
$uscs ids , <d i v c l a s s=” c o l −md−3
old ( ’ u s c s i d ’ c o l −sm−6 c o l −xs
) , array ( ’ −12 form−g r o u p ”>
c l a s s ’ => ’ @if (
btn btn− $previous sample
default ’ , ’ == n u l l )
placeholder ’ { ! ! Form : : number ( ’
=> ’ Choose sample to ’ ,
soil old ( ’
classification sample to ’ ) ,
... ’ , ’ [ ’ c l a s s ’ => ’
r e q u i r e d ’ => form−c o n t r o l ’
’ true ’ ) ) ! ! } , ’
</d i v> placeholder ’
</d i v> =>
<d i v c l a s s=” form−g r o u p ”> $to placeholder
@if ( $previous sample , ’ s t e p ’ => ’
== n u l l ) any ’ , ’
<?php r e q u i r e d ’ =>
$from placeholder ’ true ’ ] ) ! ! }
= ”From” ; @else
$to placeholder = { ! ! Form : : number ( ’
”To” ; sample to ’ ,
$depth text = ” old ( ’
Depth (m) ∗ ” ; sample to ’ ) ,
$run length default [ ’ c l a s s ’ => ’
= 0.30; form−c o n t r o l ’
?> , ’
@else placeholder ’
189
=> =>
$to placeholder $run length default
, ’ s t e p ’ => ’ ]) !!}
any ’ ] ) ! ! } </d i v>
@endif </d i v>
</d i v> <d i v c l a s s=” form−g r o u p ”>
</d i v> { ! ! Form : : l a b e l ( ’
<d i v c l a s s=” form−g r o u p ”> sample sample length
{ ! ! Form : : l a b e l ( ’ ’ , ’ Length o f
sample contract num Sample (m) ∗ ’ , [ ’
’ , ’ C o n t r a c t No . ’ c l a s s ’ => ’
, [ ’ c l a s s ’ => ’ c o n t r o l −l a b e l c o l
c o n t r o l −l a b e l c o l −md−3 c o l −sm−3
−md−3 c o l −sm−3 c o l −xs −12 ’ ] ) ! ! }
c o l −xs −12 ’ ] ) ! ! } <d i v c l a s s=” c o l −md−6
<d i v c l a s s=” c o l −md−6 c o l −sm−6 c o l −xs
c o l −sm−6 c o l −xs −12”>
−12”> { ! ! Form : : number ( ’
{ ! ! Form : : t e x t ( ’ sample sample length
sample contract num ’ , old ( ’
’ , old ( ’ sample sample length
sample contract num ’) , [ ’ class ’
’) , [ ’ class ’ => ’ form−
=> ’ form− control col−
control col− md−7 c o l −xs
md−7 c o l −xs −12 ’ , ’
−12 ’ ] ) ! ! } r e q u i r e d ’ =>
</d i v> ’ true ’ , ’ step
</d i v> ’ => ’ any ’ ] )
<d i v c l a s s=” form−g r o u p ”> !!}
{ ! ! Form : : l a b e l ( ’ </d i v>
sample job num ’ , </d i v>
’ Job No . ’ , [ ’ <d i v c l a s s=” form−g r o u p ”>
c l a s s ’ => ’ { ! ! Form : : l a b e l ( ’
c o n t r o l −l a b e l c o l sample rec percent
−md−3 c o l −sm−3 ’ , ’ Rec . (%) ∗ ’ ,
c o l −xs −12 ’ ] ) ! ! } [ ’ c l a s s ’ => ’
<d i v c l a s s=” c o l −md−6 c o n t r o l −l a b e l c o l
c o l −sm−6 c o l −xs −md−3 c o l −sm−3
−12”> c o l −xs −12 ’ ] ) ! ! }
{ ! ! Form : : t e x t ( ’ <d i v c l a s s=” c o l −md−6
sample job num c o l −sm−6 c o l −xs
’ , old ( ’ −12”>
sample job num { ! ! Form : : number ( ’
’) , [ ’ class ’ sample rec percent
=> ’ form− ’ , old ( ’
control col− sample rec percent
md−7 c o l −xs ’) , [ ’ class ’
−12 ’ ] ) ! ! } => ’ form−
</d i v> control col−
</d i v> md−7 c o l −xs
<b r/><b r/> −12 ’ , ’
<d i v c l a s s=” form−g r o u p ”> r e q u i r e d ’ =>
{ ! ! Form : : l a b e l ( ’ ’ true ’ , ’ step
sample color ’ , ’ ’ => ’ any ’ ] )
Sample C o l o r ∗ ’ , !!}
[ ’ c l a s s ’ => ’ </d i v>
c o n t r o l −l a b e l c o l </d i v>
−md−3 c o l −sm−3 <d i v c l a s s=” form−g r o u p ”>
c o l −xs −12 ’ ] ) ! ! } { ! ! Form : : l a b e l ( ’
<d i v c l a s s=” c o l −md−6 sample num of blows
c o l −sm−6 c o l −xs ’ , ’ No . o f Blows
−12”> (SPT N−Value ) ∗ ’ ,
{ ! ! Form : : t e x t ( ’ [ ’ c l a s s ’ => ’
sample color ’ c o n t r o l −l a b e l c o l
, old ( ’ −md−3 c o l −sm−3
sample color ’ c o l −xs −12 ’ ] ) ! ! }
) , [ ’ class ’ <d i v c l a s s=” c o l −md−6
=> ’ form− c o l −sm−6 c o l −xs
control col− −12”>
md−7 c o l −xs { ! ! Form : : number ( ’
−12 ’ , ’ sample num of blows
r e q u i r e d ’ => ’ , old ( ’
’ true ’ ] ) ! ! } sample num of blows
</d i v> ’) , [ ’ class ’
</d i v> => ’ form−
<d i v c l a s s=” form−g r o u p ”> control col−
{ ! ! Form : : l a b e l ( ’ md−7 c o l −xs
sample run length −12 ’ , ’
’ , ’ Length o f Run r e q u i r e d ’ =>
(m) ’ , [ ’ c l a s s ’ ’ true ’ , ’ step
=> ’ c o n t r o l −l a b e l ’ => ’ any ’ ] )
c o l −md−3 c o l −sm !!}
−3 c o l −xs −12 ’ ] ) </d i v>
!!} </d i v>
<d i v c l a s s=” c o l −md−6 <d i v c l a s s=” form−g r o u p ”>
c o l −sm−6 c o l −xs { ! ! Form : : l a b e l ( ’
−12”> sample type of sampling
{ ! ! Form : : number ( ’ ’ , ’ Type o f
sample run length Sampling ’ , [ ’
’ , old ( ’ c l a s s ’ => ’
sample run length c o n t r o l −l a b e l c o l
’) , [ ’ class ’ −md−3 c o l −sm−3
=> ’ form− c o l −xs −12 ’ ] ) ! ! }
control col− <d i v c l a s s=” c o l −md−6
md−7 c o l −xs c o l −sm−6 c o l −xs
−12 ’ , ’ s t e p ’ −12”>
=> ’ any ’ , ’ { ! ! Form : : t e x t ( ’
placeholder ’ sample type of sampling
190
’ , old ( ’ sample plasticity index
sample tester ’ , old ( ’
’) , [ ’ class ’ sample plasticity index
=> ’ form− ’) , [ ’ class ’
control col− => ’ form−
md−7 c o l −xs control col−
−12 ’ ] ) ! ! } md−7 c o l −xs
</d i v> −12 ’ , ’
</d i v> r e q u i r e d ’ =>
<b r/><b r/> ’ true ’ , ’ step
<d i v c l a s s=” form−g r o u p ”> ’ => ’ any ’ ] )
{ ! ! Form : : l a b e l ( ’ !!}
sample nmc percent </d i v>
’ , ’NMC (%) ’ , [ ’ </d i v>
c l a s s ’ => ’ <d i v c l a s s=” form−g r o u p ”>
c o n t r o l −l a b e l c o l { ! ! Form : : l a b e l ( ’
−md−3 c o l −sm−3 sample plasticity remark
c o l −xs −12 ’ ] ) ! ! } ’ , ’ Plasticity
<d i v c l a s s=” c o l −md−6 Remark ’ , [ ’ c l a s s ’
c o l −sm−6 c o l −xs => ’ c o n t r o l −
−12”> l a b e l c o l −md−3
{ ! ! Form : : number ( ’ c o l −sm−3 c o l −xs
sample nmc percent −12 ’ ] ) ! ! }
’ , old ( ’ <d i v c l a s s=” c o l −md−6
sample nmc percent c o l −sm−6 c o l −xs
’) , [ ’ class ’ −12”>
=> ’ form− { ! ! Form : : t e x t ( ’
control col− sample plasticity remark
md−7 c o l −xs ’ , old ( ’
−12 ’ , ’ s t e p ’ sample plasticity remark
=> ’ any ’ ] ) ’) , [ ’ class ’
!!} => ’ form−
</d i v> control col−
</d i v> md−7 c o l −xs
<d i v c l a s s=” form−g r o u p ”> −12 ’ ] ) ! ! }
{ ! ! Form : : l a b e l ( ’ </d i v>
sample liquid limit </d i v>
’ , ’ Liquid Limit <d i v c l a s s=” form−g r o u p ”>
∗ ’ , [ ’ c l a s s ’ => ’ { ! ! Form : : l a b e l ( ’
c o n t r o l −l a b e l c o l sample tester ’ , ’
−md−3 c o l −sm−3 Tester ’ , [ ’ c l a s s ’
c o l −xs −12 ’ ] ) ! ! } => ’ c o n t r o l −
<d i v c l a s s=” c o l −md−6 l a b e l c o l −md−3
c o l −sm−6 c o l −xs c o l −sm−3 c o l −xs
−12”> −12 ’ ] ) ! ! }
{ ! ! Form : : number ( ’ <d i v c l a s s=” c o l −md−6
sample liquid limit c o l −sm−6 c o l −xs
’ , old ( ’ −12”>
sample liquid limit { ! ! Form : : t e x t ( ’
’) , [ ’ class ’ sample tester
=> ’ form− ’ , old ( ’
control col− sample tester
md−7 c o l −xs ’) , [ ’ class ’
−12 ’ , ’ => ’ form−
r e q u i r e d ’ => control col−
’ true ’ , ’ step md−7 c o l −xs
’ => ’ any ’ ] ) −12 ’ ] ) ! ! }
!!} </d i v>
</d i v> </d i v>
</d i v> <d i v c l a s s=” form−g r o u p ”>
<d i v c l a s s=” form−g r o u p ”> { ! ! Form : : l a b e l ( ’
{ ! ! Form : : l a b e l ( ’ sample other results
sample plastic limit ’ , ’ Other T e s t
’ , ’ P l a s t i c Limit Results ’ , [ ’ class
∗ ’ , [ ’ c l a s s ’ => ’ => ’ c o n t r o l −
’ c o n t r o l −l a b e l l a b e l c o l −md−3
c o l −md−3 c o l −sm−3 c o l −sm−3 c o l −xs
c o l −xs −12 ’ ] ) ! ! } −12 ’ ] ) ! ! }
<d i v c l a s s=” c o l −md−6 <d i v c l a s s=” c o l −md−6
c o l −sm−6 c o l −xs c o l −sm−6 c o l −xs
−12”> −12”>
{ ! ! Form : : number ( ’ { ! ! Form : : t e x t ( ’
sample plastic limit sample other results
’ , old ( ’ ’ , old ( ’
sample plastic limit sample other results
’) , [ ’ class ’ ’) , [ ’ class ’
=> ’ form− => ’ form−
control col− control col−
md−7 c o l −xs md−7 c o l −xs
−12 ’ , ’ −12 ’ ] ) ! ! }
r e q u i r e d ’ => </d i v>
’ true ’ , ’ step </d i v>
’ => ’ any ’ ] ) <d i v c l a s s=” form−g r o u p ”>
!!} { ! ! Form : : l a b e l ( ’
</d i v> sample test date ’
</d i v> , ’ T e s t Date ’ , [ ’
<d i v c l a s s=” form−g r o u p ”> c l a s s ’ => ’
{ ! ! Form : : l a b e l ( ’ c o n t r o l −l a b e l c o l
sample plasticity index −md−3 c o l −sm−3
’ , ’ Plasticity c o l −xs −12 ’ ] ) ! ! }
Index ∗ ’ , [ ’ c l a s s <d i v c l a s s=” c o l −md−6
’ => ’ c o n t r o l − c o l −sm−6 c o l −xs
l a b e l c o l −md−3 −12”>
c o l −sm−3 c o l −xs { ! ! Form : : date ( ’
−12 ’ ] ) ! ! } sample test date
<d i v c l a s s=” c o l −md−6 ’ , old ( ’
c o l −sm−6 c o l −xs sample test date
−12”> ’) , [ ’ class ’
{ ! ! Form : : number ( ’ => ’ form−
191
control ’ , ’ , [ ’ c l a s s ’ => ’
placeholder ’ c o n t r o l −l a b e l c o l
=> ’ T e s t Date −md−3 c o l −sm−3
’ ]) !!} c o l −xs −12 ’ ] ) ! ! }
</d i v> <d i v c l a s s=” c o l −md−3
</d i v> c o l −sm−6 c o l −xs
</d i v> −12 form−g r o u p ”>
<d i v c l a s s=” l n s o l i d ”></d i v> <?php $ u s c s i d =
<?php $sample num = $ b o r e h o l e Helper : :
−>b h n u m o f s a m p l e s + 1 getValue ( old (
?> ’ uscs id ’ ) ,
{ ! ! Form : : h i d d e n ( ’ sample num ’ , $sample−>
$sample num ) ! ! } u s c s i d ) ?>
{ ! ! Form : : h i d d e n ( ’ b h i d ’ , { ! ! Form : : s e l e c t ( ’
$ b o r e h o l e −>i d ) ! ! } uscs id ’ ,
{ ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ $uscs ids ,
Back ’ , array ( ’ c l a s s ’ => ’ $uscs id ,
btn btn−d e f a u l t ’ ) ) ! ! } array ( ’ c l a s s ’
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’ => ’ btn btn−
c l a s s ’ => ’ btn btn− default ’ , ’
p r i m a r y ’ , ’ s t y l e ’ => ’ placeholder ’
float : right ’ ]) !!} => ’ Choose
{ ! ! Form : : c l o s e ( ) ! ! } soil
</d i v> classification
</d i v> ... ’ , ’
</d i v> r e q u i r e d ’ =>
</d i v> ’ true ’ ) ) ! ! }
@endsection </d i v>
</d i v>
<d i v c l a s s=” form−g r o u p ”>
{ ! ! Form : : l a b e l ( ’
Listing 104: samples/edit.blade.php sample from ’ , ’
Depth (m) ∗ ’ , [ ’
@extends ( ’ l a y o u t s / m a s t e r ’ ) c l a s s ’ => ’
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) c o n t r o l −l a b e l c o l
@section ( ’ content ’ ) −md−3 c o l −sm−3
<d i v c l a s s=” row ”> c o l −xs −12 ’ ] ) ! ! }
<d i v c l a s s=” c o l −md−12 c o l −sm−12 c o l −xs −12” <d i v c l a s s=” c o l −md−3
> c o l −sm−6 c o l −xs
<d i v c l a s s=” x p a n e l ”> −12 form−g r o u p ”>
<d i v c l a s s=” x t i t l e ”> <?php $ s a m p l e f r o m
<h2> E d i t Sample {{ $sample−> = Helper : :
sample num }} <s m a l l >(ID# getValue ( old (
{{ $ s a m p l e −>i d } } )</ s m a l l ’ sample from ’
></h2> ) , $sample−>
<u l c l a s s=” nav navbar−r i g h t sample from )
p a n e l t o o l b o x ”> ?>
< l i ><a c l a s s=” c o l l a p s e − { ! ! Form : : number ( ’
l i n k ”><i c l a s s=” f a f a sample from ’ ,
−c h e v r o n−up”></i ></a> $sample from
</ l i > , [ ’ c l a s s ’ =>
< l i c l a s s=” dropdown ”> ’ form−
<a h r e f=”#” c l a s s=” control ’ , ’
dropdown−t o g g l e ” r e q u i r e d ’ =>
data−t o g g l e=” ’ true ’ , ’
dropdown ” r o l e=” placeholder ’
button ” aria − => ’ From ’ , ’
expanded=” f a l s e ” s t e p ’ => ’ any
><i c l a s s=” f a f a − ’ ]) !!}
wrench ”></i ></a> </d i v>
<u l c l a s s=” dropdown− <d i v c l a s s=” c o l −md−3
menu” r o l e=”menu” c o l −sm−6 c o l −xs
> −12 form−g r o u p ”>
< l i ><a h r e f=”#”> <?php $ s a m p l e t o =
S e t t i n g s 1</a Helper : :
> getValue ( old (
</ l i > ’ sample to ’ ) ,
< l i ><a h r e f=”#”> $sample−>
S e t t i n g s 2</a s a m p l e t o ) ?>
> { ! ! Form : : number ( ’
</ l i > sample to ’ ,
</u l > $sample to , [
</ l i > ’ c l a s s ’ => ’
</u l > form−c o n t r o l ’
<d i v c l a s s=” c l e a r f i x ”></d i v> , ’ required ’
</d i v> => ’ t r u e ’ , ’
<d i v c l a s s=” x c o n t e n t ”> placeholder ’
{ ! ! Form : : open ( [ ’ name ’ => ’ => ’ To ’ , ’
u p d a t e f o r m ’ , ’ method ’ => s t e p ’ => ’ any
’PUT ’ , ’ r o u t e ’ => [ ’ ’ ]) !!}
s a m p l e s . u p d a t e ’ , $sample </d i v>
−>i d ] , ’ c l a s s ’ => ’ form− </d i v>
h o r i z o n t a l form−l a b e l − <d i v c l a s s=” form−g r o u p ”>
l e f t ’ , ’ i d ’ => ’ { ! ! Form : : l a b e l ( ’
update form ’ ] ) ! ! } sample contract num
<d i v c l a s s=” c o n t a i n e r ”> ’ , ’ C o n t r a c t No . ’
<d i v c l a s s=” form−g r o u p ”> , [ ’ c l a s s ’ => ’
<?php $ u s c s i d s = [ ] c o n t r o l −l a b e l c o l
?> −md−3 c o l −sm−3
@for ( $ i = 0 ; $ i < c o l −xs −12 ’ ] ) ! ! }
sizeof ( $uscs ) ; $i <d i v c l a s s=” c o l −md−6
++) c o l −sm−6 c o l −xs
<?php $ u s c s i d s [ $ u s c s [ −12”>
$ i ]−> i d ] = $ u s c s [ <?php
$ i ]−> i d ?> $sample contract num
@endfor = Helper : :
{ ! ! Form : : l a b e l ( ’ getValue ( old (
uscs id ’ , ’ Soil ’
Classification ∗ ’ sample contract num
192
’ ) , $sample−> { ! ! Form : : number ( ’
sample contract num sample run length
) ?> ’,
{ ! ! Form : : t e x t ( ’ $sample run length
sample contract num , [ ’ c l a s s ’ =>
’, ’ form−
$sample contract num control col−
, [ ’ c l a s s ’ => md−7 c o l −xs
’ form− −12 ’ , ’ s t e p ’
control col− => ’ any ’ , ’
md−7 c o l −xs placeholder ’
−12 ’ ] ) ! ! } => ’ 0 . 3 0 ’ , ’
</d i v> r e q u i r e d ’ =>
</d i v> ’ true ’ ] ) ! ! }
<d i v c l a s s=” form−g r o u p ”> </d i v>
{ ! ! Form : : l a b e l ( ’ </d i v>
sample job num ’ , <d i v c l a s s=” form−g r o u p ”>
’ Job No . ’ , [ ’ { ! ! Form : : l a b e l ( ’
c l a s s ’ => ’ sample sample length
c o n t r o l −l a b e l c o l ’ , ’ Length o f
−md−3 c o l −sm−3 Sample (m) ∗ ’ , [ ’
c o l −xs −12 ’ ] ) ! ! } c l a s s ’ => ’
<d i v c l a s s=” c o l −md−6 c o n t r o l −l a b e l c o l
c o l −sm−6 c o l −xs −md−3 c o l −sm−3
−12”> c o l −xs −12 ’ ] ) ! ! }
<?php <d i v c l a s s=” c o l −md−6
$sample job num c o l −sm−6 c o l −xs
= Helper : : −12”>
getValue ( old ( <?php
’ $sample sample length
sample job num = Helper : :
’ ) , $sample−> getValue ( old (
sample job num ’
) ?> sample sample length
{ ! ! Form : : t e x t ( ’ ’ ) , $sample−>
sample job num sample sample length
’, ) ?>
$sample job num { ! ! Form : : number ( ’
, [ ’ c l a s s ’ => sample sample length
’ form− ’,
control col− $sample sample length
md−7 c o l −xs , [ ’ c l a s s ’ =>
−12 ’ ] ) ! ! } ’ form−
</d i v> control col−
</d i v> md−7 c o l −xs
<b r/><b r/> −12 ’ , ’
<d i v c l a s s=” form−g r o u p ”> r e q u i r e d ’ =>
{ ! ! Form : : l a b e l ( ’ ’ true ’ , ’ step
sample color ’ , ’ ’ => ’ any ’ ] )
Sample C o l o r ∗ ’ , !!}
[ ’ c l a s s ’ => ’ </d i v>
c o n t r o l −l a b e l c o l </d i v>
−md−3 c o l −sm−3 <d i v c l a s s=” form−g r o u p ”>
c o l −xs −12 ’ ] ) ! ! } { ! ! Form : : l a b e l ( ’
<d i v c l a s s=” c o l −md−6 sample rec percent
c o l −sm−6 c o l −xs ’ , ’ Rec . (%) ∗ ’ ,
−12”> [ ’ c l a s s ’ => ’
<?php c o n t r o l −l a b e l c o l
$sample color −md−3 c o l −sm−3
= Helper : : c o l −xs −12 ’ ] ) ! ! }
getValue ( old ( <d i v c l a s s=” c o l −md−6
’ sample color c o l −sm−6 c o l −xs
’ ) , $sample−> −12”>
sample color ) <?php
?> $sample rec percent
{ ! ! Form : : t e x t ( ’ = Helper : :
sample color ’ getValue ( old (
, ’
$sample color sample rec percent
, [ ’ c l a s s ’ => ’ ) , $sample−>
’ form− sample rec percent
control col− ) ?>
md−7 c o l −xs { ! ! Form : : number ( ’
−12 ’ , ’ sample rec percent
r e q u i r e d ’ => ’,
’ true ’ ] ) ! ! } $sample rec percent
</d i v> , [ ’ c l a s s ’ =>
</d i v> ’ form−
<d i v c l a s s=” form−g r o u p ”> control col−
{ ! ! Form : : l a b e l ( ’ md−7 c o l −xs
sample run length −12 ’ , ’
’ , ’ Length o f Run r e q u i r e d ’ =>
(m) ∗ ’ , [ ’ c l a s s ’ ’ true ’ , ’ step
=> ’ c o n t r o l − ’ => ’ any ’ ] )
l a b e l c o l −md−3 !!}
c o l −sm−3 c o l −xs </d i v>
−12 ’ ] ) ! ! } </d i v>
<d i v c l a s s=” c o l −md−6 <d i v c l a s s=” form−g r o u p ”>
c o l −sm−6 c o l −xs { ! ! Form : : l a b e l ( ’
−12”> sample num of blows
<?php ’ , ’ No . o f Blows
$sample run length (SPT N−Value ) ∗ ’ ,
= Helper : : [ ’ c l a s s ’ => ’
getValue ( old ( c o n t r o l −l a b e l c o l
’ −md−3 c o l −sm−3
sample run length c o l −xs −12 ’ ] ) ! ! }
’ ) , $sample−> <d i v c l a s s=” c o l −md−6
sample run length c o l −sm−6 c o l −xs
) ?> −12”>
193
<?php c o l −sm−6 c o l −xs
$sample num of blows −12”>
= Helper : : <?php
getValue ( old ( $sample liquid limit
’ = Helper : :
sample num of blows getValue ( old (
’ ) , $sample−> ’
sample num of blows sample liquid limit
) ?> ’ ) , $sample−>
{ ! ! Form : : number ( ’ sample liquid limit
sample num of blows ) ?>
’, { ! ! Form : : number ( ’
$sample num of blows sample liquid limit
, [ ’ c l a s s ’ => ’,
’ form− $sample liquid limit
control col− , [ ’ c l a s s ’ =>
md−7 c o l −xs ’ form−
−12 ’ , ’ control col−
r e q u i r e d ’ => md−7 c o l −xs
’ true ’ , ’ step −12 ’ , ’
’ => ’ any ’ ] ) r e q u i r e d ’ =>
!!} ’ true ’ , ’ step
</d i v> ’ => ’ any ’ ] )
</d i v> !!}
<d i v c l a s s=” form−g r o u p ”> </d i v>
{ ! ! Form : : l a b e l ( ’ </d i v>
sample type of sampling <d i v c l a s s=” form−g r o u p ”>
’ , ’ Type o f { ! ! Form : : l a b e l ( ’
Sampling ’ , [ ’ sample plastic limit
c l a s s ’ => ’ ’ , ’ P l a s t i c Limit
c o n t r o l −l a b e l c o l ∗ ’ , [ ’ c l a s s ’ =>
−md−3 c o l −sm−3 ’ c o n t r o l −l a b e l
c o l −xs −12 ’ ] ) ! ! } c o l −md−3 c o l −sm−3
<d i v c l a s s=” c o l −md−6 c o l −xs −12 ’ ] ) ! ! }
c o l −sm−6 c o l −xs <d i v c l a s s=” c o l −md−6
−12”> c o l −sm−6 c o l −xs
<?php −12”>
$sample type of sampling <?php
= Helper : : $sample plastic limit
getValue ( old ( = Helper : :
’ getValue ( old (
sample type of sampling ’
’ ) , $sample−> sample plastic limit
sample type of sampling ’ ) , $sample−>
) ?> sample plastic limit
{ ! ! Form : : t e x t ( ’ ) ?>
sample type of sampling { ! ! Form : : number ( ’
’, sample plastic limit
$sample type of sampling ’,
, [ ’ c l a s s ’ => $sample plastic limit
’ form− , [ ’ c l a s s ’ =>
control col− ’ form−
md−7 c o l −xs control col−
−12 ’ ] ) ! ! } md−7 c o l −xs
</d i v> −12 ’ , ’
</d i v> r e q u i r e d ’ =>
<b r/><b r/> ’ true ’ , ’ step
<d i v c l a s s=” form−g r o u p ”> ’ => ’ any ’ ] )
{ ! ! Form : : l a b e l ( ’ !!}
sample nmc percent </d i v>
’ , ’NMC (%) ’ , [ ’ </d i v>
c l a s s ’ => ’ <d i v c l a s s=” form−g r o u p ”>
c o n t r o l −l a b e l c o l { ! ! Form : : l a b e l ( ’
−md−3 c o l −sm−3 sample plasticity index
c o l −xs −12 ’ ] ) ! ! } ’ , ’ Plasticity
<d i v c l a s s=” c o l −md−6 Index ∗ ’ , [ ’ c l a s s
c o l −sm−6 c o l −xs ’ => ’ c o n t r o l −
−12”> l a b e l c o l −md−3
<?php c o l −sm−3 c o l −xs
$sample nmc percent −12 ’ ] ) ! ! }
= Helper : : <d i v c l a s s=” c o l −md−6
getValue ( old ( c o l −sm−6 c o l −xs
’ −12”>
sample nmc percent <?php
’ ) , $sample−> $sample plasticity index
sample nmc percent = Helper : :
) ?> getValue ( old (
{ ! ! Form : : number ( ’ ’
sample nmc percent sample plasticity index
’, ’ ) , $sample−>
$sample nmc percent sample plasticity index
, [ ’ c l a s s ’ => ) ?>
’ form− { ! ! Form : : number ( ’
control col− sample plasticity index
md−7 c o l −xs ’,
−12 ’ , ’ s t e p ’ $sample plasticity index
=> ’ any ’ ] ) , [ ’ c l a s s ’ =>
!!} ’ form−
</d i v> control col−
</d i v> md−7 c o l −xs
<d i v c l a s s=” form−g r o u p ”> −12 ’ , ’
{ ! ! Form : : l a b e l ( ’ r e q u i r e d ’ =>
sample liquid limit ’ true ’ , ’ step
’ , ’ Liquid Limit ’ => ’ any ’ ] )
∗ ’ , [ ’ c l a s s ’ => ’ !!}
c o n t r o l −l a b e l c o l </d i v>
−md−3 c o l −sm−3 </d i v>
c o l −xs −12 ’ ] ) ! ! } <d i v c l a s s=” form−g r o u p ”>
<d i v c l a s s=” c o l −md−6 { ! ! Form : : l a b e l ( ’
194
sample plasticity remark −md−3 c o l −sm−3
’ , ’ Plasticity c o l −xs −12 ’ ] ) ! ! }
Remark ’ , [ ’ c l a s s ’ <d i v c l a s s=” c o l −md−6
=> ’ c o n t r o l − c o l −sm−6 c o l −xs
l a b e l c o l −md−3 −12”>
c o l −sm−3 c o l −xs <?php
−12 ’ ] ) ! ! } $sample test date
<d i v c l a s s=” c o l −md−6 = Helper : :
c o l −sm−6 c o l −xs getValue ( old (
−12”> ’
<?php sample test date
$sample plasticity remark ’ ) , $sample−>
= Helper : : sample test date
getValue ( old ( ) ?>
’ { ! ! Form : : date ( ’
sample plasticity remark sample test date
’ ) , $sample−> ’,
sample plasticity remark $sample test date
) ?> , [ ’ c l a s s ’ =>
{ ! ! Form : : t e x t ( ’ ’ form−
sample plasticity remark control ’ , ’
’, placeholder ’
$sample plasticity remark => ’ T e s t Date
, [ ’ c l a s s ’ => ’ ]) !!}
’ form− </d i v>
control col− </d i v>
md−7 c o l −xs </d i v>
−12 ’ ] ) ! ! } <d i v c l a s s=” l n s o l i d ”></d i v>
</d i v> { ! ! Form : : h i d d e n ( ’ sample num ’ ,
</d i v> $sample−>sample num ) ! ! }
<d i v c l a s s=” form−g r o u p ”> { ! ! Form : : h i d d e n ( ’ b h i d ’ ,
{ ! ! Form : : l a b e l ( ’ $ b o r e h o l e −>i d ) ! ! }
sample tester ’ , ’ { ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’
Tester ’ , [ ’ c l a s s ’ Back ’ , array ( ’ c l a s s ’ => ’
=> ’ c o n t r o l − btn btn−d e f a u l t ’ ) ) ! ! }
l a b e l c o l −md−3 { ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’
c o l −sm−3 c o l −xs c l a s s ’ => ’ btn btn−
−12 ’ ] ) ! ! } p r i m a r y ’ , ’ s t y l e ’ => ’
<d i v c l a s s=” c o l −md−6 float : right ’ ]) !!}
c o l −sm−6 c o l −xs { ! ! Form : : c l o s e ( ) ! ! }
−12”> </d i v>
<?php </d i v>
$sample tester </d i v>
= Helper : : </d i v>
getValue ( old ( @endsection
’
sample tester
’ ) , $sample−>
sample tester
) ?>
Listing 105: sections/create.blade.php
{ ! ! Form : : t e x t ( ’ @extends ( ’ l a y o u t s / m a s t e r ’ )
sample tester @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
’, @section ( ’ s t y l e s h e e t s ’ )
$sample tester @parent
, [ ’ c l a s s ’ => <!−− e d i t o r −−>
’ form− <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / f o n t −awesome .
control col− c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
md−7 c o l −xs <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / e d i t o r / e x t e r n a l
−12 ’ ] ) ! ! } / g o o g l e −code−p r e t t i f y / p r e t t i f y . c s s ’ ) }} ”
</d i v> r e l =” s t y l e s h e e t ”>
</d i v> <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / e d i t o r / i n d e x .
<d i v c l a s s=” form−g r o u p ”> c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
{ ! ! Form : : l a b e l ( ’ <!−− s e l e c t 2 −−>
s a m p l e o t h e r r e s u l t s<l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / s e l e c t / s e l e c t 2 .
’ , ’ Other T e s t min . c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
Results ’ , [ ’ class <!−− s w i t c h e r y −−>
’ => ’ c o n t r o l − <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / s w i t c h e r y /
l a b e l c o l −md−3 s w i t c h e r y . min . c s s ’ ) }} ” r e l =” s t y l e s h e e t ”
c o l −sm−3 c o l −xs />
−12 ’ ] ) ! ! } @endsection
<d i v c l a s s=” c o l −md−6 @section ( ’ content ’ )
c o l −sm−6 c o l −xs <?php $ s e c t i o n n a m e = $ POST [ ” s e c t i o n n a m e ” ]
−12”> ?>
<?php <d i v c l a s s=” row ”>
$ s a m p l e o t h e r r e s u l t<d
s i v c l a s s=” c o l −md−12”>
= Helper : : <d i v c l a s s=” x p a n e l ”>
getValue ( old ( <d i v c l a s s=” x t i t l e ”>
’ <h2>{{ ”Add ” . $ s e c t i o n n a m e
sample other results }}</h2>
’ ) , $sample−> <u l c l a s s=” nav navbar−r i g h t
sample other results p a n e l t o o l b o x ”>
) ?> < l i ><a c l a s s=” c o l l a p s e −
{ ! ! Form : : t e x t ( ’ l i n k ”><i c l a s s=” f a f a
sample other results −c h e v r o n−up”></i ></a>
’, </ l i >
$sample other results < l i c l a s s=” dropdown ”>
, [ ’ c l a s s ’ => <a h r e f=”#” c l a s s=”
’ form− dropdown−t o g g l e ”
control col− data−t o g g l e=”
md−7 c o l −xs dropdown ” r o l e=”
−12 ’ ] ) ! ! } button ” aria −
</d i v> expanded=” f a l s e ”
</d i v> ><i c l a s s=” f a f a −
<d i v c l a s s=” form−g r o u p ”> wrench ”></i ></a>
{ ! ! Form : : l a b e l ( ’ <u l c l a s s=” dropdown−
sample test date ’ menu” r o l e=”menu”
, ’ T e s t Date ’ , [ ’ >
c l a s s ’ => ’ < l i ><a h r e f=”#”>
c o n t r o l −l a b e l c o l S e t t i n g s 1</a
195
> <a c l a s s=” btn ” data−
</ l i > e d i t=”
< l i ><a h r e f=”#”> insertunorderedlist
S e t t i n g s 2</a ” t i t l e =” B u l l e t
> l i s t ”><i c l a s s=”
</ l i > i c o n −l i s t −u l ”></i
</u l > ></a>
</ l i > <a c l a s s=” btn ” data−
</u l > e d i t=”
<d i v c l a s s=” c l e a r f i x ”></d i v> insertorderedlist
</d i v> ” t i t l e =”Number
<d i v c l a s s=” x c o n t e n t ”> l i s t ”><i c l a s s=”
<d i v i d=” a l e r t s ”></d i v> i c o n −l i s t −o l ”></i
<d i v c l a s s=” btn−t o o l b a r e d i t o r ></a>
” data−r o l e=” e d i t o r − <a c l a s s=” btn ” data−
t o o l b a r ” data−t a r g e t=”# e d i t=” o u t d e n t ”
e d i t o r ”> t i t l e =” Reduce
<d i v c l a s s=” btn−g r o u p ”> i n d e n t ( S h i f t+Tab
<a c l a s s=” btn dropdown ) ”><i c l a s s=” i c o n
−t o g g l e ” data− −i n d e n t − l e f t ”></i
t o g g l e=” dropdown ” ></a>
t i t l e =” Font S i z e <a c l a s s=” btn ” data−
”><i c l a s s=” i c o n − e d i t=” i n d e n t ”
t e x t −h e i g h t ”></i t i t l e =” I n d e n t (
>  ;<b c l a s s=” Tab ) ”><i c l a s s=”
c a r e t ”></b></a> i c o n −i n d e n t −r i g h t
<u l c l a s s=” dropdown− ”></i ></a>
menu”> </d i v>
<l i > <d i v c l a s s=” btn−g r o u p ”>
<a data−e d i t=” <a c l a s s=” btn ” data−
fontSize e d i t=” j u s t i f y l e f t
5 ”> ” t i t l e =” A l i g n
<p s t y l e=” L e f t ( C t r l /Cmd+L )
font− ”><i c l a s s=” i c o n −
size a l i g n − l e f t ”></i
: 1 7 px ></a>
”> <a c l a s s=” btn ” data−
Huge e d i t=”
</p> justifycenter ”
</a> t i t l e =” C e n t e r (
</ l i > C t r l /Cmd+E) ”><i
<l i > c l a s s=” i c o n −a l i g n
<a data−e d i t=” −c e n t e r ”></i ></a>
fontSize <a c l a s s=” btn ” data−
3 ”> e d i t=”
<p s t y l e=” justifyright”
font− t i t l e =” A l i g n
size R i g h t ( C t r l /Cmd+R
: 1 4 px ) ”><i c l a s s=” i c o n
”> −a l i g n −r i g h t ”></i
Normal ></a>
</p> <a c l a s s=” btn ” data−
</a> e d i t=” j u s t i f y f u l l
</ l i > ” t i t l e =” J u s t i f y
<l i > ( C t r l /Cmd+J ) ”><i
<a data−e d i t=” c l a s s=” i c o n −a l i g n
fontSize − j u s t i f y ”></i ></a
1 ”> >
<p s t y l e=” </d i v>
font− <d i v c l a s s=” btn−g r o u p ”>
size <a c l a s s=” btn ” t i t l e =”
: 1 1 px Insert picture (
”> or j u s t drag &
Small drop ) ” i d=”
</p> p i c t u r e B t n ”><i
</a> c l a s s=” i c o n −
</ l i > p i c t u r e ”></i ></a>
</u l > <i n p u t t y p e=” f i l e ”
</d i v> data−r o l e=” magic−
<d i v c l a s s=” btn−g r o u p ”> o v e r l a y ” data−
<a c l a s s=” btn ” data− t a r g e t=”#
e d i t=” b o l d ” t i t l e p i c t u r e B t n ” data−
=” Bold ( C t r l /Cmd+ e d i t=” i n s e r t I m a g e
B) ”><i c l a s s=” ” />
i c o n −b o l d ”></i ></ </d i v>
a> </d i v>
<a c l a s s=” btn ” data− { ! ! Form : : open ( [ ’ name ’ => ’
e d i t=” i t a l i c ” s t o r e f o r m ’ , ’ method ’ =>
t i t l e =” I t a l i c ( ’POST ’ , ’ r o u t e ’ => ’
C t r l /Cmd+I ) ”><i sections . store ’ , ’
c l a s s=” i c o n − o n su b mi t ’ => ’ document .
i t a l i c ”></i ></a> store form . section text .
<a c l a s s=” btn ” data− v a l u e = $(”# e d i t o r ” ) . html
e d i t=” () ’ ]) !!}
strikethrough ” <?php
t i t l e =” $text = Helper : :
S t r i k e t h r o u g h ”><i getSectionTemplate (
c l a s s=” i c o n − $section name ,
s t r i k e t h r o u g h ”></ $ p r o j e c t −>i d ) ;
i ></a> $ s e c t i o n k e y = Helper : :
<a c l a s s=” btn ” data− getSectionKey (
e d i t=” u n d e r l i n e ” $section name ) ;
t i t l e =” U n d e r l i n e ?>
( C t r l /Cmd+U) ”><i <t e x t a r e a name=” s e c t i o n t e x t ”
c l a s s=” i c o n − i d=” s e c t i o n t e x t ” s t y l e=”
u n d e r l i n e ”></i ></ d i s p l a y : none ; ”>
a>
</d i v> </
<d i v c l a s s=” btn−g r o u p ”> textarea
196
> validate () ;
<d i v i d=” e d i t o r ” validateFront () ;
c o n t e n t e d i t a b l e=” t r u e ”> }) ;
{ ! ! $text ! ! } var validateFront = function () {
</d i v> i f ( true === $ ( ’#demo−form2 ’ ) .
<b r /> parsley () . isValid () ) {
<d i v c l a s s=” l n s o l i d ”></d i v> $ ( ’ . bs−c a l l o u t −i n f o ’ ) .
{ ! ! Form : : h i d d e n ( ’ p r o j i d ’ , removeClass ( ’ hidden ’ ) ;
$ p r o j e c t −>i d ) ! ! } $ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) .
{ ! ! Form : : h i d d e n ( ’ s e c t i o n k e y ’ addClass ( ’ hidden ’ ) ;
, $section key ) !!} } else {
{ ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ $ ( ’ . bs−c a l l o u t −i n f o ’ ) . a d d C l a s s
Back ’ , array ( ’ c l a s s ’ => ’ ( ’ hidden ’ ) ;
btn btn−d e f a u l t ’ ) ) ! ! } $ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) .
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’ removeClass ( ’ hidden ’ ) ;
c l a s s ’ => ’ btn btn− }
p r i m a r y ’ , ’ s t y l e ’ => ’ };
float : right ’ ]) !!} }) ;
{ ! ! Form : : c l o s e ( ) ! ! } try {
</d i v> h l j s . initHighlightingOnLoad () ;
</d i v> } c a t c h ( e r r ) {}
</d i v> </ s c r i p t >
</d i v> <!−− / form v a l i d a t i o n −−>
@endsection <!−− e d i t o r −−>
@section ( ’ j s ’ ) <s c r i p t >
@parent $ ( document ) . r e a d y ( f u n c t i o n ( ) {
<!−− t a g s −−> $ ( ’ . xcxc ’ ) . c l i c k ( f u n c t i o n ( ) {
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / t a g s / j q u e r y . $ ( ’#s e c t i o n t e x t ’ ) . v a l ( $ ( ’#e d i t o r ’
t a g s i n p u t . min . j s ’ ) }} ”></ s c r i p t > ) . html ( ) ) ;
<!−− s w i t c h e r y −−> }) ;
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / s w i t c h e r y / }) ;
s w i t c h e r y . min . j s ’ ) }} ”></ s c r i p t >
<!−− d a t e r a n g e p i c k e r −−> $( function () {
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s /moment . min2 . j s function initToolbarBootstrapBindings
’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ”></ s c r i p t > () {
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / d a t e p i c k e r / var f o n t s = [ ’ A r i a l ’ , ’ A r i a l Black
d a t e r a n g e p i c k e r . j s ’ ) }} ” t y p e=” t e x t / ’ , ’ C a l i b r i ’ , ’ Cambria ’ , ’
j a v a s c r i p t ”></ s c r i p t > Comic Sans MS ’ , ’ C o u r i e r ’ ,
<!−− r i c h t e x t e d i t o r −−> ’ C o u r i e r New ’ , ’ H e l v e t i c a ’ , ’ Impact ’ ,
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / e d i t o r / ’ L u c i d a Grande ’ , ’ L u c i d a Sans ’ , ’
b o o t s t r a p −wysiwyg . j s ’ ) }} ”></ s c r i p t > Sans ’ , ’ S e r i f ’ , ’ Tahoma ’ , ’ Times ’
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / e d i t o r / e x t e r n a l ,
/ j q u e r y . h o t k e y s . j s ’ ) }} ”></ s c r i p t > ’ Times New Roman ’ , ’ Verdana ’ ] ,
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / e d i t o r / e x t e r n a l f o n t T a r g e t = $ ( ’ [ t i t l e =Font ] ’ )
/ g o o g l e −code−p r e t t i f y / p r e t t i f y . j s ’ ) }} ” . s i b l i n g s ( ’ . dropdown−menu
></ s c r i p t > ’);
<!−− s e l e c t 2 −−> $ . each ( f o n t s , f u n c t i o n ( i d x ,
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / s e l e c t / s e l e c t 2 . fontName ) {
f u l l . j s ’ ) }} ”></ s c r i p t > f o n t T a r g e t . append ( $ ( ’< l i ><a
<!−− form v a l i d a t i o n −−> data−e d i t =”fontName ’ +
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / p a r s l e y / p a r s l e y fontName + ’ ” s t y l e =” f o n t
. min . j s ’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ” ></ −f a m i l y : \ ’ ’ + fontName +
script > ’ \ ’” > ’ + fontName + ’</a
<!−− t e x t a r e a r e s i z e −−> ></ l i > ’ ) ) ;
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / t e x t a r e a / }) ;
a u t o s i z e . min . j s ’ ) }} ”></ s c r i p t > $ ( ’ a [ t i t l e ] ’ ) . t o o l t i p ({
<!−− A u t o c o m p l e t e −−> c o n t a i n e r : ’ body ’
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / a u t o c o m p l e t e / }) ;
c o u n t r i e s . j s ’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ” $ ( ’ . dropdown−menu i n p u t ’ ) . c l i c k (
></ s c r i p t > function () {
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / a u t o c o m p l e t e / return false ;
j q u e r y . a u t o c o m p l e t e . j s ’ ) }} ”></ s c r i p t > })
<!−− form v a l i d a t i o n −−> . change ( f u n c t i o n ( ) {
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”> $ ( t h i s ) . p a r e n t ( ’ . dropdown−
$ ( document ) . r e a d y ( f u n c t i o n ( ) { menu ’ ) . s i b l i n g s ( ’ .
$ . listen ( ’ parsley : f i e l d : validate ’ , dropdown−t o g g l e ’ ) .
function () { dropdown ( ’ t o g g l e ’ ) ;
validateFront () ; })
}) ; . keydown ( ’ e s c ’ , f u n c t i o n ( ) {
$ ( ’#demo−form . btn ’ ) . on ( ’ c l i c k ’ , t h i s . value = ’ ’ ;
function () { $ ( t h i s ) . change ( ) ;
$ ( ’#demo−form ’ ) . p a r s l e y ( ) . v a l i d a t e }) ;
() ;
validateFront () ; $ ( ’ [ data−r o l e=magic−o v e r l a y ] ’ ) .
}) ; each ( f u n c t i o n ( ) {
var v a l i d a t e F r o n t = f u n c t i o n ( ) { var o v e r l a y = $ ( t h i s ) ,
i f ( true === $ ( ’#demo−form ’ ) . t a r g e t = $ ( o v e r l a y . data ( ’
parsley () . isValid () ) { target ’ ) ) ;
$ ( ’ . bs−c a l l o u t −i n f o ’ ) . overlay . c s s ( ’ opacity ’ , 0) . c s s (
removeClass ( ’ hidden ’ ) ; ’ position ’ , ’ absolute ’ ) .
$ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) . offset ( target . offset () ) .
addClass ( ’ hidden ’ ) ; width ( t a r g e t . outerWidth ( )
} else { ) . height ( target .
$ ( ’ . bs−c a l l o u t −i n f o ’ ) . a d d C l a s s outerHeight () ) ;
( ’ hidden ’ ) ; }) ;
$ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) . i f ( ” onwebkitspeechchange ” in
removeClass ( ’ hidden ’ ) ; document . c r e a t e E l e m e n t ( ” i n p u t
} ”) ) {
}; v a r e d i t o r O f f s e t = $ ( ’#e d i t o r ’
}) ; ) . offset () ;
$ ( ’#v o i c e B t n ’ ) . c s s ( ’ p o s i t i o n ’ ,
$ ( document ) . r e a d y ( f u n c t i o n ( ) { ’ a b s o l u t e ’ ) . o f f s e t ({
$ . listen ( ’ parsley : f i e l d : validate ’ , t o p : e d i t o r O f f s e t . top ,
function () { left : editorOffset . left +
validateFront () ; $ ( ’#e d i t o r ’ ) .
}) ; i n n e r W i d t h ( ) − 35
$ ( ’#demo−form2 . btn ’ ) . on ( ’ c l i c k ’ , }) ;
function () { } else {
$ ( ’#demo−form2 ’ ) . p a r s l e y ( ) . $ ( ’#v o i c e B t n ’ ) . h i d e ( ) ;
197
} t o o l b a r ” data−t a r g e t=”#
}; e d i t o r ”>
<d i v c l a s s=” btn−g r o u p ”>
f u n c t i o n showErrorAlert ( reason , d e t a i l <a c l a s s=” btn dropdown
) { −t o g g l e ” data−
v a r msg = ’ ’ ; t o g g l e=” dropdown ”
i f ( r e a s o n === ’ u n s u p p o r t e d − f i l e − t i t l e =” Font S i z e
type ’ ) { ”><i c l a s s=” i c o n −
msg = ” Unsupported f o r m a t ” + t e x t −h e i g h t ”></i
detail ; >  ;<b c l a s s=”
} else { c a r e t ”></b></a>
c o n s o l e . log ( ” e r r o r uploading <u l c l a s s=” dropdown−
f i l e ” , reason , d e t a i l ) ; menu”>
} <l i >
$ ( ’<d i v c l a s s =” a l e r t ”> <b u t t o n <a data−e d i t=”
t y p e=”b u t t o n ” c l a s s =” c l o s e ” fontSize
data−d i s m i s s =” a l e r t ”>&t i m e s 5 ”>
; </ button> ’ + <p s t y l e=”
’<s t r o n g >F i l e u p l o a d e r r o r </ font−
s t r o n g > ’ + msg + ’ </d i v size
> ’ ) . prependTo ( ’#a l e r t s ’ ) ; : 1 7 px
}; ”>
initToolbarBootstrapBindings () ; Huge
$ ( ’#e d i t o r ’ ) . wysiwyg ( { </p>
fileUploadError : showErrorAlert </a>
}) ; </ l i >
window . p r e t t y P r i n t && p r e t t y P r i n t ( ) ; <l i >
}) ; <a data−e d i t=”
</ s c r i p t > fontSize
<!−− / e d i t o r −−> 3 ”>
@endsection <p s t y l e=”
font−
size
: 1 4 px
Listing 106: sections/edit.blade.php ”>
Normal
@extends ( ’ l a y o u t s / m a s t e r ’ ) </p>
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) </a>
@section ( ’ s t y l e s h e e t s ’ ) </ l i >
@parent <l i >
<!−− e d i t o r −−> <a data−e d i t=”
<l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / f o n t −awesome . fontSize
c s s ’ ) }} ” r e l =” s t y l e s h e e t ”> 1 ”>
<l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / e d i t o r / e x t e r n a l <p s t y l e=”
/ g o o g l e −code−p r e t t i f y / p r e t t i f y . c s s ’ ) }} ” font−
r e l =” s t y l e s h e e t ”> size
<l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / e d i t o r / i n d e x . : 1 1 px
c s s ’ ) }} ” r e l =” s t y l e s h e e t ”> ”>
<!−− s e l e c t 2 −−> Small
<l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / s e l e c t / s e l e c t 2 . </p>
min . c s s ’ ) }} ” r e l =” s t y l e s h e e t ”> </a>
<!−− s w i t c h e r y −−> </ l i >
<l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / s w i t c h e r y / </u l >
s w i t c h e r y . min . c s s ’ ) }} ” r e l =” s t y l e s h e e t ” </d i v>
/> <d i v c l a s s=” btn−g r o u p ”>
@endsection <a c l a s s=” btn ” data−
@section ( ’ content ’ ) e d i t=” b o l d ” t i t l e
<d i v c l a s s=” row ”> =” Bold ( C t r l /Cmd+
<d i v c l a s s=” c o l −md−12”> B) ”><i c l a s s=”
<d i v c l a s s=” x p a n e l ”> i c o n −b o l d ”></i ></
<d i v c l a s s=” x t i t l e ”> a>
<h2>E d i t {{ H e l p e r : : <a c l a s s=” btn ” data−
g e t S e c t i o n N a m e ( $ s e c t i o n −> e d i t=” i t a l i c ”
s e c t i o n k e y ) }}</h2> t i t l e =” I t a l i c (
<u l c l a s s=” nav navbar−r i g h t C t r l /Cmd+I ) ”><i
p a n e l t o o l b o x ”> c l a s s=” i c o n −
< l i ><a c l a s s=” c o l l a p s e − i t a l i c ”></i ></a>
l i n k ”><i c l a s s=” f a f a <a c l a s s=” btn ” data−
−c h e v r o n−up”></i ></a> e d i t=”
</ l i > strikethrough ”
< l i c l a s s=” dropdown ”> t i t l e =”
<a h r e f=”#” c l a s s=” S t r i k e t h r o u g h ”><i
dropdown−t o g g l e ” c l a s s=” i c o n −
data−t o g g l e=” s t r i k e t h r o u g h ”></
dropdown ” r o l e=” i ></a>
button ” aria − <a c l a s s=” btn ” data−
expanded=” f a l s e ” e d i t=” u n d e r l i n e ”
><i c l a s s=” f a f a − t i t l e =” U n d e r l i n e
wrench ”></i ></a> ( C t r l /Cmd+U) ”><i
<u l c l a s s=” dropdown− c l a s s=” i c o n −
menu” r o l e=”menu” u n d e r l i n e ”></i ></
> a>
< l i ><a h r e f=”#”> </d i v>
S e t t i n g s 1</a <d i v c l a s s=” btn−g r o u p ”>
> <a c l a s s=” btn ” data−
</ l i > e d i t=”
< l i ><a h r e f=”#”> insertunorderedlist
S e t t i n g s 2</a ” t i t l e =” B u l l e t
> l i s t ”><i c l a s s=”
</ l i > i c o n −l i s t −u l ”></i
</u l > ></a>
</ l i > <a c l a s s=” btn ” data−
</u l > e d i t=”
<d i v c l a s s=” c l e a r f i x ”></d i v> insertorderedlist
</d i v> ” t i t l e =”Number
<d i v c l a s s=” x c o n t e n t ”> l i s t ”><i c l a s s=”
<d i v i d=” a l e r t s ”></d i v> i c o n −l i s t −o l ”></i
<d i v c l a s s=” btn−t o o l b a r e d i t o r ></a>
” data−r o l e=” e d i t o r − <a c l a s s=” btn ” data−
198
e d i t=” o u t d e n t ” @endsection
t i t l e =” Reduce @section ( ’ j s ’ )
i n d e n t ( S h i f t+Tab @parent
) ”><i c l a s s=” i c o n <!−− t a g s −−>
−i n d e n t − l e f t ”></i < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / t a g s / j q u e r y .
></a> t a g s i n p u t . min . j s ’ ) }} ”></ s c r i p t >
<a c l a s s=” btn ” data− <!−− s w i t c h e r y −−>
e d i t=” i n d e n t ” < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / s w i t c h e r y /
t i t l e =” I n d e n t ( s w i t c h e r y . min . j s ’ ) }} ”></ s c r i p t >
Tab ) ”><i c l a s s=” <!−− d a t e r a n g e p i c k e r −−>
i c o n −i n d e n t −r i g h t < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s /moment . min2 . j s
”></i ></a> ’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ”></ s c r i p t >
</d i v> < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / d a t e p i c k e r /
<d i v c l a s s=” btn−g r o u p ”> d a t e r a n g e p i c k e r . j s ’ ) }} ” t y p e=” t e x t /
<a c l a s s=” btn ” data− j a v a s c r i p t ”></ s c r i p t >
e d i t=” j u s t i f y l e f t <!−− r i c h t e x t e d i t o r −−>
” t i t l e =” A l i g n < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / e d i t o r /
L e f t ( C t r l /Cmd+L ) b o o t s t r a p −wysiwyg . j s ’ ) }} ”></ s c r i p t >
”><i c l a s s=” i c o n − < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / e d i t o r / e x t e r n a l
a l i g n − l e f t ”></i / j q u e r y . h o t k e y s . j s ’ ) }} ”></ s c r i p t >
></a> < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / e d i t o r / e x t e r n a l
<a c l a s s=” btn ” data− / g o o g l e −code−p r e t t i f y / p r e t t i f y . j s ’ ) }} ”
e d i t=” ></ s c r i p t >
justifycenter ” <!−− s e l e c t 2 −−>
t i t l e =” C e n t e r ( < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / s e l e c t / s e l e c t 2 .
C t r l /Cmd+E) ”><i f u l l . j s ’ ) }} ”></ s c r i p t >
c l a s s=” i c o n −a l i g n <!−− form v a l i d a t i o n −−>
−c e n t e r ”></i ></a> < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / p a r s l e y / p a r s l e y
<a c l a s s=” btn ” data− . min . j s ’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ” ></
e d i t=” script >
justifyright” <!−− t e x t a r e a r e s i z e −−>
t i t l e =” A l i g n < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / t e x t a r e a /
R i g h t ( C t r l /Cmd+R a u t o s i z e . min . j s ’ ) }} ”></ s c r i p t >
) ”><i c l a s s=” i c o n <!−− A u t o c o m p l e t e −−>
−a l i g n −r i g h t ”></i < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / a u t o c o m p l e t e /
></a> c o u n t r i e s . j s ’ ) }} ” t y p e=” t e x t / j a v a s c r i p t ”
<a c l a s s=” btn ” data− ></ s c r i p t >
e d i t=” j u s t i f y f u l l < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / a u t o c o m p l e t e /
” t i t l e =” J u s t i f y j q u e r y . a u t o c o m p l e t e . j s ’ ) }} ”></ s c r i p t >
( C t r l /Cmd+J ) ”><i <!−− form v a l i d a t i o n −−>
c l a s s=” i c o n −a l i g n < s c r i p t t y p e=” t e x t / j a v a s c r i p t ”>
− j u s t i f y ”></i ></a $ ( document ) . r e a d y ( f u n c t i o n ( ) {
> $ . listen ( ’ parsley : f i e l d : validate ’ ,
</d i v> function () {
<d i v c l a s s=” btn−g r o u p ”> validateFront () ;
<a c l a s s=” btn ” t i t l e =” }) ;
Insert picture ( $ ( ’#demo−form . btn ’ ) . on ( ’ c l i c k ’ ,
or j u s t drag & function () {
drop ) ” i d=” $ ( ’#demo−form ’ ) . p a r s l e y ( ) . v a l i d a t e
p i c t u r e B t n ”><i () ;
c l a s s=” i c o n − validateFront () ;
p i c t u r e ”></i ></a> }) ;
<i n p u t t y p e=” f i l e ” var v a l i d a t e F r o n t = f u n c t i o n ( ) {
data−r o l e=” magic− i f ( true === $ ( ’#demo−form ’ ) .
o v e r l a y ” data− parsley () . isValid () ) {
t a r g e t=”# $ ( ’ . bs−c a l l o u t −i n f o ’ ) .
p i c t u r e B t n ” data− removeClass ( ’ hidden ’ ) ;
e d i t=” i n s e r t I m a g e $ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) .
” /> addClass ( ’ hidden ’ ) ;
</d i v> } else {
</d i v> $ ( ’ . bs−c a l l o u t −i n f o ’ ) . a d d C l a s s
{ ! ! Form : : open ( [ ’ name ’ => ’ ( ’ hidden ’ ) ;
u p d a t e f o r m ’ , ’ method ’ => $ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) .
’PUT ’ , ’ r o u t e ’ => [ ’ removeClass ( ’ hidden ’ ) ;
s e c t i o n s . update ’ , }
$ s e c t i o n −>i d ] , ’ o n su b m it ’ };
=> ’ document . u p d a t e f o r m }) ;
. s e c t i o n t e x t . value = $
(”# e d i t o r ” ) . html ( ) ’ ] ) ! ! } $ ( document ) . r e a d y ( f u n c t i o n ( ) {
{ ! ! Form : : h i d d e n ( ’ p r o j i d ’ , $ . listen ( ’ parsley : f i e l d : validate ’ ,
$ p r o j e c t −>i d ) ! ! } function () {
<?php $ t e x t = H e l p e r : : validateFront () ;
g e t S e c t i o n T e x t ( $ s e c t i o n −> }) ;
i d ) ?> $ ( ’#demo−form2 . btn ’ ) . on ( ’ c l i c k ’ ,
<t e x t a r e a name=” s e c t i o n t e x t ” function () {
i d=” s e c t i o n t e x t ” s t y l e=” $ ( ’#demo−form2 ’ ) . p a r s l e y ( ) .
d i s p l a y : none ; ”> validate () ;
validateFront () ;
</ }) ;
textarea var v a l i d a t e F r o n t = f u n c t i o n ( ) {
> i f ( true === $ ( ’#demo−form2 ’ ) .
<d i v i d=” e d i t o r ”> parsley () . isValid () ) {
{ ! ! $ t e x t [0] − > s e c t i o n t e x t $ ( ’ . bs−c a l l o u t −i n f o ’ ) .
!!} removeClass ( ’ hidden ’ ) ;
</d i v> $ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) .
<b r /> addClass ( ’ hidden ’ ) ;
<d i v c l a s s=” l n s o l i d ”></d i v> } else {
{ ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’ $ ( ’ . bs−c a l l o u t −i n f o ’ ) . a d d C l a s s
Back ’ , array ( ’ c l a s s ’ => ’ ( ’ hidden ’ ) ;
btn btn−d e f a u l t ’ ) ) ! ! } $ ( ’ . bs−c a l l o u t −w a r n i n g ’ ) .
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’ removeClass ( ’ hidden ’ ) ;
c l a s s ’ => ’ btn btn− }
p r i m a r y ’ , ’ s t y l e ’ => ’ };
float : right ’ ]) !!} }) ;
{ ! ! Form : : c l o s e ( ) ! ! } try {
</d i v> h l j s . initHighlightingOnLoad () ;
</d i v> } c a t c h ( e r r ) {}
</d i v> </ s c r i p t >
</d i v> <!−− / form v a l i d a t i o n −−>
199
<!−− e d i t o r −−> $ ( ’#e d i t o r ’ ) . wysiwyg ( {
<s c r i p t > fileUploadError : showErrorAlert
$ ( document ) . r e a d y ( f u n c t i o n ( ) { }) ;
$ ( ’ . xcxc ’ ) . c l i c k ( f u n c t i o n ( ) { window . p r e t t y P r i n t && p r e t t y P r i n t ( ) ;
$ ( ’#s e c t i o n t e x t ’ ) . v a l ( $ ( ’#e d i t o r ’ }) ;
) . html ( ) ) ; </ s c r i p t >
}) ; <!−− / e d i t o r −−>
}) ; @endsection
$( function () {
function initToolbarBootstrapBindings
() {
var f o n t s = [ ’ A r i a l ’ , ’ A r i a l Black
Listing 107: sections/show.blade.php
’ , ’ C a l i b r i ’ , ’ Cambria ’ , ’ @extends ( ’ l a y o u t s / m a s t e r ’ )
Comic Sans MS ’ , ’ C o u r i e r ’ , @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
’ C o u r i e r New ’ , ’ H e l v e t i c a ’ , ’ Impact ’ , @section ( ’ content ’ )
’ L u c i d a Grande ’ , ’ L u c i d a Sans ’ , ’ <?php $ s e c t i o n n a m e = H e l p e r : : g e t S e c t i o n N a m e (
Sans ’ , ’ S e r i f ’ , ’ Tahoma ’ , ’ Times ’ $ s e c t i o n −>s e c t i o n k e y ) ?>
, <d i v c l a s s=” row ”>
’ Times New Roman ’ , ’ Verdana ’ ] , <d i v c l a s s=” c o l −md−12”>
f o n t T a r g e t = $ ( ’ [ t i t l e =Font ] ’ ) <d i v c l a s s=” x p a n e l ”>
. s i b l i n g s ( ’ . dropdown−menu <d i v c l a s s=” x t i t l e ”>
’); <h2>{{ $ s e c t i o n n a m e }}</h2>
$ . each ( f o n t s , f u n c t i o n ( i d x , <u l c l a s s=” nav navbar−r i g h t
fontName ) { p a n e l t o o l b o x ”>
f o n t T a r g e t . append ( $ ( ’< l i ><a < l i ><a c l a s s=” c o l l a p s e −
data−e d i t =”fontName ’ + l i n k ”><i c l a s s=” f a f a
fontName + ’ ” s t y l e =” f o n t −c h e v r o n−up”></i ></a>
−f a m i l y : \ ’ ’ + fontName + </ l i >
’ \ ’” > ’ + fontName + ’</a < l i c l a s s=” dropdown ”>
></ l i > ’ ) ) ; <a h r e f=”#” c l a s s=”
}) ; dropdown−t o g g l e ”
$ ( ’ a [ t i t l e ] ’ ) . t o o l t i p ({ data−t o g g l e=”
c o n t a i n e r : ’ body ’ dropdown ” r o l e=”
}) ; button ” aria −
$ ( ’ . dropdown−menu i n p u t ’ ) . c l i c k ( expanded=” f a l s e ”
function () { ><i c l a s s=” f a f a −
return false ; wrench ”></i ></a>
}) <u l c l a s s=” dropdown−
. change ( f u n c t i o n ( ) { menu” r o l e=”menu”
$ ( t h i s ) . p a r e n t ( ’ . dropdown− >
menu ’ ) . s i b l i n g s ( ’ . < l i ><a h r e f=”#”>
dropdown−t o g g l e ’ ) . S e t t i n g s 1</a
dropdown ( ’ t o g g l e ’ ) ; >
}) </ l i >
. keydown ( ’ e s c ’ , f u n c t i o n ( ) { < l i ><a h r e f=”#”>
t h i s . value = ’ ’ ; S e t t i n g s 2</a
$ ( t h i s ) . change ( ) ; >
}) ; </ l i >
</u l >
$ ( ’ [ data−r o l e=magic−o v e r l a y ] ’ ) . </ l i >
each ( f u n c t i o n ( ) { </u l >
var o v e r l a y = $ ( t h i s ) , <d i v c l a s s=” c l e a r f i x ”></d i v>
t a r g e t = $ ( o v e r l a y . data ( ’ </d i v>
target ’ ) ) ; <d i v c l a s s=” x c o n t e n t ”>
overlay . c s s ( ’ opacity ’ , 0) . c s s ( <?php $ t e x t = H e l p e r : :
’ position ’ , ’ absolute ’ ) . g e t S e c t i o n T e x t ( $ s e c t i o n −>
offset ( target . offset () ) . i d ) ?>
width ( t a r g e t . outerWidth ( ) { ! ! $ t e x t [0] − > s e c t i o n t e x t ! ! }
) . height ( target . <d i v c l a s s=” l n s o l i d ”></d i v>
outerHeight () ) ; { ! ! Form : : open ( [ ’ method ’ => ’
}) ; DELETE ’ , ’ r o u t e ’ => [ ’
i f ( ” onwebkitspeechchange ” in deeps . destroy ’ , $project
document . c r e a t e E l e m e n t ( ” i n p u t −>i d ] , ’ o n su b m it ’ => ’
”) ) { return confirm (” Delete
v a r e d i t o r O f f s e t = $ ( ’#e d i t o r ’ SBC d a t a f o r deep
) . offset () ; foundation permanently ?”)
$ ( ’#v o i c e B t n ’ ) . c s s ( ’ p o s i t i o n ’ , ’ ]) !!}
’ a b s o l u t e ’ ) . o f f s e t ({ { ! ! Form : : s u b m i t ( ’ D e l e t e ’ , [ ’
t o p : e d i t o r O f f s e t . top , c l a s s ’ => ’ btn btn−d a n g e r
left : editorOffset . left + ’ ]) !!}
$ ( ’#e d i t o r ’ ) . <a h r e f=” {{ r o u t e ( ’ s e c t i o n s .
i n n e r W i d t h ( ) − 35 e d i t ’ , $ s e c t i o n −>i d ) }} ”
}) ; c l a s s=” btn btn−i n f o ”
} else { s t y l e=” f l o a t : r i g h t ”><i
$ ( ’#v o i c e B t n ’ ) . h i d e ( ) ; c l a s s=” f a f a −e d i t m−r i g h t
} −x s ”></i > E d i t </a>
}; { ! ! Form : : c l o s e ( ) ! ! }
</d i v>
f u n c t i o n showErrorAlert ( reason , d e t a i l </d i v>
) { </d i v>
v a r msg = ’ ’ ; </d i v>
i f ( r e a s o n === ’ u n s u p p o r t e d − f i l e − @endsection
type ’ ) {
msg = ” Unsupported f o r m a t ” +
detail ;
} else {
c o n s o l e . log ( ” e r r o r uploading
Listing 108: shallows/calcu-
}
f i l e ” , reason , d e t a i l ) ;
late.blade.php
$ ( ’<d i v c l a s s =” a l e r t ”> <b u t t o n @include ( ’ i n c l u d e s / clearform ’ )
t y p e=”b u t t o n ” c l a s s =” c l o s e ”
data−d i s m i s s =” a l e r t ”>&t i m e s <!−− t o o l t i p −−>
; </ button> ’ + <s c r i p t >
’<s t r o n g >F i l e u p l o a d e r r o r </ $ ( document ) . r e a d y ( f u n c t i o n ( ) {
s t r o n g > ’ + msg + ’ </d i v $ ( ’ [ data−t o g g l e =” t o o l t i p ” ] ’ ) . t o o l t i p ( )
> ’ ) . prependTo ( ’#a l e r t s ’ ) ; ;
}; }) ;
initToolbarBootstrapBindings () ; </ s c r i p t >
200
<!−− / t o o l t i p −−> <d i v c l a s s=” x p a n e l ”>
<d i v c l a s s=” x t i t l e ”>
<!−− c a l c u l a t e −−> <h2>C r e a t e − S h a l l o w
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”> F o u n d a t i o n <s m a l l >Compute
v a r n u m o f b o r e h o l e s = <?php echo s o i l bearing capacity
s i z e o f ( $ b o r e h o l e s ) ? >; f o r s h a l l o w f o u n d a t i o n </
var num of samples ; s m a l l ></h2>
var s o i l t y p e , num of blows , <u l c l a s s=” nav navbar−r i g h t
c denominator , c ; p a n e l t o o l b o x ”>
v a r d f , nc , ngamma , nq , b , gamma1 , < l i ><a c l a s s=” c o l l a p s e −
gamma2 , f s , q u l t , q ; l i n k ”><i c l a s s=” f a f a
−c h e v r o n−up”></i ></a>
function calculate () { </ l i >
f o r ( i = 1 ; i <= n u m o f b o r e h o l e s ; < l i c l a s s=” dropdown ”>
i ++) { <a h r e f=”#” c l a s s=”
num of samples = $ ( ’ . dropdown−t o g g l e ”
shallow depth ’ + i ) . data−t o g g l e=”
length ; dropdown ” r o l e=”
c o n s o l e . log ( num of samples ) ; button ” aria −
f o r ( j = 1 ; j <= n u m o f s a m p l e s expanded=” f a l s e ”
; j ++) { ><i c l a s s=” f a f a −
wrench ”></i ></a>
// C a l c u l a t e s h a l l o w c <u l c l a s s=” dropdown−
s o i l t y p e = $ ( ’# menu” r o l e=”menu”
shallow soil ’ + i + >
’ ’ + j + ’ option : < l i ><a h r e f=”#”>
selected ’ ) . text () ; S e t t i n g s 1</a
n u m o f b l o w s = $ ( ’# >
shallow num of blows </ l i >
’ + i + ’ ’ + j ) . val < l i ><a h r e f=”#”>
() ; S e t t i n g s 2</a
>
switch ( s o i l t y p e ) { </ l i >
case ’ c l a y ’ : </u l >
c denominator = </ l i >
4 ; break ; </u l >
case ’ s i l t ’ : <d i v c l a s s=” c l e a r f i x ”></d i v>
c denominator = </d i v>
5 ; break ; <d i v c l a s s=” x c o n t e n t ”>
default : c denominator @if ( sizeof ( $samples ) > 0)
= n u l l ; break ; <?php $ s o i l = [ ” c l a y ” , ” s i l t ” ]
} ?>
{ ! ! Form : : open ( [ ’ name ’ => ’
c = ( num of blows ∗48) / s t o r e f o r m ’ , ’ method ’ =>
c denominator ; ’POST ’ , ’ r o u t e ’ => ’
$ ( ’#s h a l l o w c ’ + i + ’ ’ shallows . store ’ , ’ class ’
+ j ) . val ( parseFloat ( c => ’ form−h o r i z o n t a l form−
. toFixed (4) ) ) ; l a b e l −l e f t ’ ] ) ! ! }
@foreach ( $ b o r e h o l e s as
// Calculate shallow qult $borehole )
{ ! ! Form : : h i d d e n ( ’ b h i d [ ] ’ ,
d f = $ ( ’#s h a l l o w d e p t h ’ + $ b o r e h o l e −>i d ) ! ! }
i + ’ ’ + j ) . val () ; { ! ! Form : : h i d d e n ( ’
nc = $ ( ’#s h a l l o w N c ’ + i ) num of samples [ ] ’ ,
. val () ; $ b o r e h o l e −>
ngamma = $ ( ’# bh num of samples ) ! ! }
shallow Ngamma ’ + i ) <c e n t e r >
. val () ; <h2>B o r e h o l e {{ $ b o r e h o l e
nq = $ ( ’#s h a l l o w N q ’ + i ) −>bh num }} <s m a l l >(
. val () ; ID#{{ $ b o r e h o l e −>i d
b = $ ( ’#s h a l l o w B ’ + i ) . } } )</ s m a l l ></h2>
val () ; </ c e n t e r >
gamma1 = $ ( ’# <t a b l e c l a s s=” t a b l e t a b l e −
shallow gamma1 ’ + i ) s t r i p e d t a b l e −h o v e r ”>
. val () ; <thead>
gamma2 = $ ( ’# <t r >
shallow gamma2 ’ + i ) <th><a data−t o g g l e
. val () ; =” t o o l t i p ”
f s = $ ( ’#s h a l l o w f s ’ + i ) t i t l e =”
. val () ; Footing width
”>B</a></th>
q u l t = c ∗ nc + 0 . 5 ∗ b∗gamma1 <th><a data−t o g g l e
∗ngamma + gamma2∗ d f ∗ =” t o o l t i p ”
nq ; t i t l e =” Angle
$ ( ’#s h a l l o w q u l t ’ + i + ’ of internal
’ + j ) . val ( f r i c t i o n ”>&
parseFloat ( qult . Phi ; </a></th>
toFixed (4) ) ) ; <th><a data−t o g g l e
=” t o o l t i p ”
// C a l c u l a t e s h a l l o w q t i t l e =” S o i l
q = qult / fs ; bearing
$ ( ’#s h a l l o w q ’ + i + ’ ’ capacity
+ j ) . val ( parseFloat (q f a c t o r s whose
. toFixed (4) ) ) ; values
} depend on t h e
} angle of
} internal
</ s c r i p t > f r i c t i o n ”>N<
<!−− / c a l c u l a t e −−> sub>c</sub></
a></th>
<th><a data−t o g g l e
=” t o o l t i p ”
Listing 109: shallows/create.blade.php t i t l e =” S o i l
bearing
@extends ( ’ l a y o u t s / m a s t e r ’ ) capacity
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) f a c t o r s whose
@section ( ’ content ’ ) values
<d i v c l a s s=” row ”> depend on t h e
<d i v c l a s s=” c o l −md−12”> angle of
201
internal v a l u e=” {{ o l d
f r i c t i o n ”>N< (’
sub>γ </ shallow Ngamma
sub></a></th> ’ ) }} ” i d=”
<th><a data−t o g g l e shallow Ngamma
=” t o o l t i p ” {{ $ b o r e h o l e
t i t l e =” S o i l −>bh num }} ”
bearing r e q u i r e d ></td
capacity >
f a c t o r s whose <td><i n p u t t y p e=”
values number ” name=
depend on t h e ” shallow Nq [ ]
angle of ” c l a s s=” form
internal −c o n t r o l
f r i c t i o n ”>N< to clear ”
sub>q</sub></ s t e p=” any ”
a></th> v a l u e=” {{ o l d
<th><a data−t o g g l e ( ’ shallow Nq
=” t o o l t i p ” ’ ) }} ” i d=”
t i t l e =” s h a l l o w N q {{
Effective $ b o r e h o l e −>
unit weight bh num }} ”
o f s o i l below r e q u i r e d ></td
footing >
l e v e l ”>&gamma <td><i n p u t t y p e=”
;< sub >1</sub number ” name=
></a></th> ”
<th><a data−t o g g l e shallow gamma1
=” t o o l t i p ” [ ] ” c l a s s=”
t i t l e =” form−c o n t r o l
Effective to clear ”
unit weight s t e p=” any ”
o f s o i l above v a l u e=” {{ o l d
footing (’
l e v e l ”>&gamma shallow gamma1
;< sub >2</sub ’ ) }} ” i d=”
></a></th> shallow gamma1
<th><a data−t o g g l e {{ $ b o r e h o l e
=” t o o l t i p ” −>bh num }} ”
t i t l e =” F a c t o r r e q u i r e d ></td
o f s a f e t y ”> >
FS</a></th> <td><i n p u t t y p e=”
</t r > number ” name=
</thead> ”
<tbody> shallow gamma2
<t r > [ ] ” c l a s s=”
<td><i n p u t t y p e=” form−c o n t r o l
number ” name= to clear ”
” shallow B [ ] ” s t e p=” any ”
c l a s s=” form− v a l u e=” {{ o l d
control (’
to clear ” shallow gamma2
s t e p=” any ” ’ ) }} ” i d=”
v a l u e=” {{ o l d shallow gamma2
( ’ shallow B ’) {{ $ b o r e h o l e
}} ” i d=” −>bh num }} ”
s h a l l o w B {{ r e q u i r e d ></td
$ b o r e h o l e −> >
bh num }} ” <td><i n p u t t y p e=”
r e q u i r e d ></td number ” name=
> ” shallow fs [ ]
<td><i n p u t t y p e=” ” c l a s s=” form
number ” name= −c o n t r o l
” shallow phi to clear ”
[ ] ” c l a s s=” s t e p=” any ”
form−c o n t r o l v a l u e=” {{ o l d
to clear ” ( ’ shallow fs
s t e p=” any ” ’ ) }} ” i d=”
v a l u e=” {{ o l d s h a l l o w f s {{
( ’ shallow phi $ b o r e h o l e −>
’ ) }} ” i d=” bh num }} ”
shallow phi r e q u i r e d ></td
{{ $ b o r e h o l e >
−>bh num }} ” </t r >
r e q u i r e d ></td </tbody>
> </ t a b l e >
<td><i n p u t t y p e=” <t a b l e c l a s s=” t a b l e t a b l e −
number ” name= s t r i p e d t a b l e −h o v e r ”>
” shallow Nc [ ] <thead>
” c l a s s=” form <t r >
−c o n t r o l <th><a data−t o g g l e
to clear ” =” t o o l t i p ”
s t e p=” any ” t i t l e =” Depth
v a l u e=” {{ o l d of footing
( ’ shallow Nc below l o w e s t
’ ) }} ” i d=” adjacent s o i l
s h a l l o w N c {{ s u r f a c e ”>D<
$ b o r e h o l e −> sub>f </sub></
bh num }} ” a></th>
r e q u i r e d ></td <th><a data−t o g g l e
> =” t o o l t i p ”
<td><i n p u t t y p e=” t i t l e =”Number
number ” name= o f b l o w s ”>
” SPT N−v a l u e </
shallow Ngamma a></th>
[ ] ” c l a s s=” <th>S o i l Type</th>
form−c o n t r o l <th><a data−t o g g l e
to clear ” =” t o o l t i p ”
s t e p=” any ” t i t l e =”
202
Cohesion o f shallow soil
the s o i l [] ’) ,
below f o o t i n g array ( ’
l e v e l ”>c</a c l a s s ’ =>
></th> ’ btn btn
<th><a data−t o g g l e −d e f a u l t
=” t o o l t i p ” shallow soil
t i t l e =” {{
Ultimate $borehole
gross bearing −>bh num
capacity or }} ’ , ’
s o i l −b e a r i n g placeholder
p r e s s u r e ”>q< ’ => ’
sub>u l t </sub S o i l type
></a></th> ... ’ , ’
<th><a data−t o g g l e required ’
=” t o o l t i p ” => ’ t r u e
t i t l e =” D e s i g n ’ , ’ id ’
bearing =>
c a p a c i t y ”>q</ $shallow soil select id
a></th> )) !!}
<th><a data−t o g g l e </td>
=” t o o l t i p ” <td><i n p u t t y p e=”
t i t l e =” D e s i g n number ” name=
bearing ” shallow c [ ] ”
c a p a c i t y ”> c l a s s=” form−
Choose </a></ control
th> to clear
</t r > s h a l l o w c {{
</thead> $ b o r e h o l e −>
<tbody> bh num }} ”
@foreach ( $samples as s t e p=” any ” i d
$sample ) =” s h a l l o w c
@ i f ( $sample−>b h i d == {{ $ b o r e h o l e
$ b o r e h o l e −>i d ) −>bh num }}
{ ! ! Form : : h i d d e n ( ’ {{ $sample−>
sample id [ ] ’ , sample num }}
$sample−>i d ) ! ! } ” readonly
<t r > r e q u i r e d ></td
<td><i n p u t t y p e=” >
number ” name= <td><i n p u t t y p e=”
” number ” name=
shallow depth ” shallow qult
[ ] ” c l a s s=” [ ] ” c l a s s=”
form−c o n t r o l form−c o n t r o l
shallow depth to clear
{{ $ b o r e h o l e shallow qult
−>bh num }} ” {{ $ b o r e h o l e
s t e p=” any ” −>bh num }} ”
v a l u e=” {{ s t e p=” any ” i d
$sample−> =”
s a m p l e t o }} ” shallow qult
i d=” {{ $ b o r e h o l e
shallow depth −>bh num }}
{{ $ b o r e h o l e {{ $sample−>
−>bh num }} sample num }}
{{ $sample−> ” readonly
sample num }} r e q u i r e d ></td
” r e a d o n l y ></ >
td> <td><i n p u t t y p e=”
<td><i n p u t t y p e=” number ” name=
number ” name= ” shallow q [ ] ”
” c l a s s=” form−
shallow num of blows control
[ ] ” c l a s s=” to clear
form−c o n t r o l s h a l l o w q {{
shallow num of blows $ b o r e h o l e −>
{{ $ b o r e h o l e bh num }} ”
−>bh num }} ” s t e p=” any ” i d
s t e p=” any ” =” s h a l l o w q
v a l u e=” {{ {{ $ b o r e h o l e
$sample−> −>bh num }}
sample num of blows {{ $sample−>
}} ” i d=” sample num }}
shallow num of blows ” readonly
{{ $ b o r e h o l e r e q u i r e d ></td
−>bh num }} >
{{ $sample−> <t d s t y l e=” t e x t −
sample num }} align : center ;
” r e a d o n l y ></ ”><i n p u t t y p e
td> =” c h e c k b o x ”
<td> name=”
<?php shallow is chosen
$shallow soil select id [ ] ” v a l u e=” {{
= ’ $sample−>i d
shallow soil }} ”></td>
’ . </t r >
$borehole @endif
−>bh num @endforeach
. ’ ’ . </tbody>
$sample−> </ t a b l e >
sample num <b r/>
?> @endforeach
{ ! ! Form : : <d i v c l a s s=” l n s o l i d ”></d i v>
select ( ’ { ! ! Form : : h i d d e n ( ’ p r o j i d ’ ,
shallow soil $ p r o j e c t −>i d ) ! ! }
[] ’ , { ! ! Form : : h i d d e n ( ’
$soil , s h a l l o w i s c h o s e n [ ] ’ , −1)
old ( ’ !!}
203
{!!
l i n k t o (URL : : p r e v i o u s ( ) , ’ <t r >
Back ’ , array ( ’ c l a s s ’ => ’ <th><a data−t o g g l e
btn btn−d e f a u l t ’ ) ) ! ! } =” t o o l t i p ”
{ ! ! Form : : b u t t o n ( ’ C l e a r ’ , [ ’ t i t l e =”
c l a s s ’ => ’ btn btn−d a n g e r Footing width
’ , ’ o n c l i c k ’ => ’ ”>B</a></th>
clearForm ( ) ’ ] ) ! ! } <th><a data−t o g g l e
{ ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’ =” t o o l t i p ”
c l a s s ’ => ’ btn btn− t i t l e =” Angle
p r i m a r y ’ , ’ s t y l e ’ => ’ of internal
float : right ’ , ’ onclick ’ f r i c t i o n ”>&
=> ’ c a l c u l a t e ( ) ’ ] ) ! ! } Phi ; </a></th>
{ ! ! Form : : b u t t o n ( ’ C a l c u l a t e ’ , <th><a data−t o g g l e
[ ’ c l a s s ’ => ’ btn btn− =” t o o l t i p ”
s u c c e s s ’ , ’ s t y l e ’ => ’ t i t l e =” S o i l
float : right ’ , ’ onclick ’ bearing
=> ’ c a l c u l a t e ( ) ’ ] ) ! ! } capacity
{ ! ! Form : : c l o s e ( ) ! ! } f a c t o r s whose
@endif values
</d i v> depend on t h e
</d i v> angle of
</d i v> internal
</d i v> f r i c t i o n ”>N<
@endsection sub>c</sub></
@section ( ’ j s ’ ) a></th>
@parent <th><a data−t o g g l e
@include ( ’ shallows / c a l c u l a t e ’ ) =” t o o l t i p ”
@endsection t i t l e =” S o i l
bearing
capacity
f a c t o r s whose
Listing 110: shallows/edit.blade.php values
depend on t h e
@extends ( ’ l a y o u t s / m a s t e r ’ ) angle of
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) internal
@section ( ’ content ’ ) f r i c t i o n ”>N<
<d i v c l a s s=” row ”> sub>γ </
<d i v c l a s s=” c o l −md−12”> sub></a></th>
<d i v c l a s s=” x p a n e l ”> <th><a data−t o g g l e
<d i v c l a s s=” x t i t l e ”> =” t o o l t i p ”
<h2>E d i t − S h a l l o w F o u n d a t i o n t i t l e =” S o i l
<s m a l l >Compute s o i l bearing
bearing capacity for capacity
s h a l l o w f o u n d a t i o n </s m a l l f a c t o r s whose
></h2> values
<u l c l a s s=” nav navbar−r i g h t depend on t h e
p a n e l t o o l b o x ”> angle of
< l i ><a c l a s s=” c o l l a p s e − internal
l i n k ”><i c l a s s=” f a f a f r i c t i o n ”>N<
−c h e v r o n−up”></i ></a> sub>q</sub></
</ l i > a></th>
< l i c l a s s=” dropdown ”> <th><a data−t o g g l e
<a h r e f=”#” c l a s s=” =” t o o l t i p ”
dropdown−t o g g l e ” t i t l e =”
data−t o g g l e=” Effective
dropdown ” r o l e=” unit weight
button ” aria − o f s o i l below
expanded=” f a l s e ” footing
><i c l a s s=” f a f a − l e v e l ”>&gamma
wrench ”></i ></a> ;< sub >1</sub
<u l c l a s s=” dropdown− ></a></th>
menu” r o l e=”menu” <th><a data−t o g g l e
> =” t o o l t i p ”
< l i ><a h r e f=”#”> t i t l e =”
S e t t i n g s 1</a Effective
> unit weight
</ l i > o f s o i l above
< l i ><a h r e f=”#”> footing
S e t t i n g s 2</a l e v e l ”>&gamma
> ;< sub >2</sub
</ l i > ></a></th>
</u l > <th><a data−t o g g l e
</ l i > =” t o o l t i p ”
</u l > t i t l e =” F a c t o r
<d i v c l a s s=” c l e a r f i x ”></d i v> o f s a f e t y ”>
</d i v> FS</a></th>
<d i v c l a s s=” x c o n t e n t ”> </t r >
@if ( sizeof ( $shallows ) > 0) </thead>
<?php $ s o i l = [ ” c l a y ” , ” s i l t ” ] <tbody>
?> <?php $ i = 0 ?>
{ ! ! Form : : open ( [ ’ name ’ => ’ @while ( $ b o r e h o l e −>i d
u p d a t e f o r m ’ , ’ method ’ => != $ s h a l l o w s [ $ i
’PUT ’ , ’ r o u t e ’ => [ ’ ]−> b h i d )
s h a l l o w s . update ’ , <?php $ i++ ?>
$ p r o j e c t −>i d ] , ’ c l a s s ’ => @endwhile
’ form−h o r i z o n t a l form− <t r >
l a b e l − l e f t ’ , ’ i d ’ => ’ <td>
update form ’ ] ) ! ! } <?php
@foreach ( $ b o r e h o l e s as $shallow B
$borehole ) = Helper
<c e n t e r > ::
<h2>B o r e h o l e {{ $ b o r e h o l e getValue (
−>bh num }} <s m a l l >( old ( ’
ID#{{ $ b o r e h o l e −>i d shallow B
} } )</ s m a l l ></h2> ’) ,
</ c e n t e r > $shallows
<t a b l e c l a s s=” t a b l e t a b l e − [ $ i ]−>
s t r i p e d t a b l e −h o v e r ”> shallow B
<thead> ) ?>
204
<i n p u t t y p e=” [ $ i ]−>
number ” shallow Ngamma
name=” ) ?>
shallow B <i n p u t t y p e=”
[] ” class number ”
=” form− name=”
control shallow Ngamma
to clear ” [] ” class
s t e p=” =” form−
any ” control
v a l u e=” {{ to clear ”
( float ) s t e p=”
$shallow B any ”
}} ” i d=” v a l u e=” {{
shallow B ( float )
{{ $shallow Ngamma
$borehole }} ” i d=”
−>bh num shallow Ngamma
}} ” {{
required> $borehole
</td> −>bh num
<td> }} ”
<?php required>
$shallow phi </td>
= Helper <td>
:: <?php
getValue ( $shallow Nq
old ( ’ = Helper
shallow phi ::
’) , getValue (
$shallows old ( ’
[ $ i ]−> shallow Nq
shallow phi ’) ,
) ?> $shallows
<i n p u t t y p e=” [ $ i ]−>
number ” shallow Nq
name=” ) ?>
shallow phi <i n p u t t y p e=”
[] ” class number ”
=” form− name=”
control shallow Nq
to clear ” [] ” class
s t e p=” =” form−
any ” control
v a l u e=” {{ to clear ”
( float ) s t e p=”
$shallow phi any ”
}} ” i d=” v a l u e=” {{
shallow phi ( float )
{{ $shallow Nq
$borehole }} ” i d=”
−>bh num shallow Nq
}} ” {{
required> $borehole
</td> −>bh num
<td> }} ”
<?php required>
$shallow Nc </td>
= Helper <td>
:: <?php
getValue ( $shallow gamma1
old ( ’ = Helper
shallow Nc ::
’) , getValue (
$shallows old ( ’
[ $ i ]−> shallow gamma1
shallow Nc ’) ,
) ?> $shallows
<i n p u t t y p e=” [ $ i ]−>
number ” shallow gamma1
name=” ) ?>
shallow Nc <i n p u t t y p e=”
[] ” class number ”
=” form− name=”
control shallow gamma1
to clear ” [] ” class
s t e p=” =” form−
any ” control
v a l u e=” {{ to clear ”
( float ) s t e p=”
$shallow Nc any ”
}} ” i d=” v a l u e=” {{
shallow Nc ( float )
{{ $shallow gamma1
$borehole }} ” i d=”
−>bh num shallow gamma1
}} ” {{
required> $borehole
</td> −>bh num
<td> }} ”
<?php required>
$shallow Ngamma </td>
= Helper <td>
:: <?php
getValue ( $shallow gamma2
old ( ’ = Helper
shallow Ngamma ::
’) , getValue (
$shallows old ( ’
205
shallow gamma2 p r e s s u r e ”>q<
’) , sub>u l t </sub
$shallows ></a></th>
[ $ i ]−> <th><a data−t o g g l e
shallow gamma2 =” t o o l t i p ”
) ?> t i t l e =” D e s i g n
<i n p u t t y p e=” bearing
number ” c a p a c i t y ”>q</
name=” a></th>
shallow gamma2 <th><a data−t o g g l e
[] ” class =” t o o l t i p ”
=” form− t i t l e =” ”>
control Choose </a></
to clear ” th>
s t e p=” </t r >
any ” </thead>
v a l u e=” {{ <tbody>
( float ) <?php $ j = 0 ; $k = 1 ;
$shallow gamma2 ?>
}} ” i d=” @foreach ( $ shallows as
shallow gamma2 $shallow )
{{ @ i f ( $ s h a l l o w −>b h i d
$borehole === $ b o r e h o l e −>i d
−>bh num )
}} ” { ! ! Form : : h i d d e n ( ’
required> sample id [ ] ’ ,
</td> $ s h a l l o w −>
<td> sample id ) ! ! }
<?php { ! ! Form : : h i d d e n ( ’
$shallow fs shallow id [ ] ’ ,
= Helper $ s h a l l o w −>i d ) ! ! }
:: <t r >
getValue ( <td><i n p u t t y p e=”
old ( ’ number ” name=
shallow fs ”
’) , shallow depth
$shallows [ ] ” c l a s s=”
[ $ i ]−> form−c o n t r o l
shallow fs shallow depth
) ?> {{ $ b o r e h o l e
<i n p u t t y p e=” −>bh num }} ”
number ” s t e p=” any ”
name=” v a l u e=” {{ (
shallow fs float )
[] ” class $samples [ $ j
=” form− ]−> s a m p l e t o
control }} ” i d=”
to clear ” shallow depth
s t e p=” {{ $ b o r e h o l e
any ” −>bh num }}
v a l u e=” {{ {{ $k }} ”
( float ) r e a d o n l y ></td
$shallow fs >
}} ” i d=” <td><i n p u t t y p e=”
shallow fs number ” name=
{{ ”
$borehole shallow num of blows
−>bh num [ ] ” c l a s s=”
}} ” form−c o n t r o l
required> shallow num of blows
</td> {{ $ b o r e h o l e
</t r > −>bh num }} ”
</tbody> s t e p=” any ”
</ t a b l e > v a l u e=” {{ (
<t a b l e c l a s s=” t a b l e t a b l e − float )
s t r i p e d t a b l e −h o v e r ”> $samples [ $ j
<thead> ]−>
<t r > sample num of blows
<th><a data−t o g g l e }} ” i d=”
=” t o o l t i p ” shallow num of blows
t i t l e =” Depth {{ $ b o r e h o l e
of footing −>bh num }}
below l o w e s t {{ $k }} ”
adjacent s o i l r e a d o n l y ></td
s u r f a c e ”>D< >
sub>f </sub></ <td>
a></th> <?php
<th><a data−t o g g l e $shallow soil select id
=” t o o l t i p ” = ’
t i t l e =”Number shallow soil
o f b l o w s ”> ’ .
SPT N−v a l u e </ $borehole
a></th> −>
<th>S o i l Type</th> bh num
<th><a data−t o g g l e . ’
=” t o o l t i p ” ’ .
t i t l e =” $k ;
Cohesion o f $shallow soil
the s o i l =
below f o o t i n g Helper
l e v e l ”>c</a ::
></th> getValue
<th><a data−t o g g l e ( old (
=” t o o l t i p ” ’
t i t l e =” shallow soil
Ultimate ’) ,
gross bearing $shallow
capacity or −>
s o i l −b e a r i n g shallow soil
206
); −>
?> shallow is chosen
{ ! ! Form : : == 1 ) ?
select ( ’ $checked
shallow soil = ”
[] ’ , checked ”
$soil , :
$shallow soil $checked
, array ( ’ = ”” ?>
c l a s s ’ => <i n p u t t y p e=”
’ btn btn checkbox ”
−d e f a u l t name=”
shallow soil shallow is chosen
{{ [ ] ” value
$borehole =” {{
−>bh num $shallow
}} ’ , ’ −>
placeholder sample id
’ => ’ }} ”
S o i l type s t y l e=”
... ’ , ’ text−
required ’ align :
=> ’ t r u e center ”
’ , ’ id ’ {{
=> $checked
$shallow soil select id }}>
)) !!} </td>
</td> </t r >
<td><i n p u t t y p e=” <?php $k++ ?>
number ” name= @endif
” shallow c [ ] ” <?php $ j++ ?>
c l a s s=” form− @endforeach
control </tbody>
to clear </ t a b l e >
s h a l l o w c {{ <b r/>
$ b o r e h o l e −> { ! ! Form : : h i d d e n ( ’ b h i d [ ] ’ ,
bh num }} ” $ b o r e h o l e −>i d ) ! ! }
s t e p=” any ” { ! ! Form : : h i d d e n ( ’
v a l u e=” {{ ( n u m o f s a m p l e s [ ] ’ , $k −1)
float ) !!}
$ s h a l l o w −> @endforeach
s h a l l o w c }} ” <d i v c l a s s=” l n s o l i d ”></d i v>
i d=” { ! ! Form : : h i d d e n ( ’ p r o j i d ’ ,
s h a l l o w c {{ $ p r o j e c t −>i d ) ! ! }
$ b o r e h o l e −> { ! ! Form : : h i d d e n ( ’
bh num }} {{ s h a l l o w i s c h o s e n [ ] ’ , −1)
$k }} ” !!}
readonly { ! ! l i n k t o (URL : : p r e v i o u s ( ) , ’
r e q u i r e d ></td Back ’ , array ( ’ c l a s s ’ => ’
> btn btn−d e f a u l t ’ ) ) ! ! }
<td><i n p u t t y p e=” { ! ! Form : : b u t t o n ( ’ C l e a r ’ , [ ’
number ” name= c l a s s ’ => ’ btn btn−d a n g e r
” shallow qult ’ , ’ o n c l i c k ’ => ’
[ ] ” c l a s s=” clearForm ( ) ’ ] ) ! ! }
form−c o n t r o l { ! ! Form : : s u b m i t ( ’ Submit ’ , [ ’
to clear c l a s s ’ => ’ btn btn−
shallow qult p r i m a r y ’ , ’ s t y l e ’ => ’
{{ $ b o r e h o l e float : right ’ , ’ onclick ’
−>bh num }} ” => ’ c a l c u l a t e ( ) ’ ] ) ! ! }
s t e p=” any ” { ! ! Form : : b u t t o n ( ’ C a l c u l a t e ’ ,
v a l u e=” {{ ( [ ’ c l a s s ’ => ’ btn btn−
float ) s u c c e s s ’ , ’ s t y l e ’ => ’
$ s h a l l o w −> float : right ’ , ’ onclick ’
shallow qult => ’ c a l c u l a t e ( ) ’ ] ) ! ! }
}} ” i d=” { ! ! Form : : c l o s e ( ) ! ! }
shallow qult @endif
{{ $ b o r e h o l e </d i v>
−>bh num }} </d i v>
{{ $k }} ” </d i v>
readonly </d i v>
r e q u i r e d ></td @endsection
> @section ( ’ j s ’ )
<td><i n p u t t y p e=” @parent
number ” name= @include ( ’ shallows / c a l c u l a t e ’ )
” shallow q [ ] ” @endsection
c l a s s=” form−
control
to clear
s h a l l o w q {{
$ b o r e h o l e −>
Listing 111: shallows/index.blade.php
bh num }} ” @extends ( ’ l a y o u t s / m a s t e r ’ )
s t e p=” any ” @ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e )
v a l u e=” {{ ( @section ( ’ content ’ )
float ) <d i v c l a s s=” row ”>
$ s h a l l o w −> <d i v c l a s s=” c o l −md−12”>
s h a l l o w q }} ” <d i v c l a s s=” x p a n e l ”>
i d=” <d i v c l a s s=” x t i t l e ”>
s h a l l o w q {{ <h2>S h a l l o w F o u n d a t i o n <s m a l l >
$ b o r e h o l e −> Compute s o i l b e a r i n g
bh num }} {{ capacity for shallow
$k }} ” f o u n d a t i o n </s m a l l ></h2>
readonly <u l c l a s s=” nav navbar−r i g h t
r e q u i r e d ></td p a n e l t o o l b o x ”>
> < l i ><a c l a s s=” c o l l a p s e −
<t d s t y l e=” t e x t − l i n k ”><i c l a s s=” f a f a
align : center ; −c h e v r o n−up”></i ></a>
”> </ l i >
<?php ( < l i c l a s s=” dropdown ”>
$shallow <a h r e f=”#” c l a s s=”
207
dropdown−t o g g l e ” t i t l e =”
data−t o g g l e=” Effective
dropdown ” r o l e=” unit weight
button ” aria − o f s o i l above
expanded=” f a l s e ” footing
><i c l a s s=” f a f a − l e v e l ”>&gamma
wrench ”></i ></a> ;< sub >2</sub
<u l c l a s s=” dropdown− ></a></th>
menu” r o l e=”menu” <th><a data−t o g g l e
> =” t o o l t i p ”
< l i ><a h r e f=”#”> t i t l e =” F a c t o r
S e t t i n g s 1</a o f s a f e t y ”>
> FS</a></th>
</ l i > </t r >
< l i ><a h r e f=”#”> </thead>
S e t t i n g s 2</a <tbody>
> <?php $ i = 0 ?>
</ l i > @while ( $ b o r e h o l e −>i d
</u l > != $ s h a l l o w s [ $ i
</ l i > ]−> b h i d )
</u l > <?php $ i++ ?>
<d i v c l a s s=” c l e a r f i x ”></d i v> @endwhile
</d i v> <t r >
<d i v c l a s s=” x c o n t e n t ”> <td >{{ ( f l o a t )
@if ( sizeof ( $shallows ) > 0) $shallows [ $i
@foreach ( $ b o r e h o l e s as ]−> s h a l l o w B
$borehole ) }}</td>
<c e n t e r > <td >{{ ( f l o a t )
<h2>B o r e h o l e {{ $ b o r e h o l e $shallows [ $i
−>bh num }} <s m a l l >( ]−>
ID#{{ $ b o r e h o l e −>i d shallow phi
} } )</ s m a l l ></h2> }}</td>
</ c e n t e r > <td >{{ ( f l o a t )
<t a b l e c l a s s=” t a b l e t a b l e − $shallows [ $i
s t r i p e d t a b l e −h o v e r ”> ]−> s h a l l o w N c
<thead> }}</td>
<t r > <td >{{ ( f l o a t )
<th><a data−t o g g l e $shallows [ $i
=” t o o l t i p ” ]−>
t i t l e =” shallow Ngamma
Footing width }}</td>
”>B</a></th> <td >{{ ( f l o a t )
<th><a data−t o g g l e $shallows [ $i
=” t o o l t i p ” ]−> s h a l l o w N q
t i t l e =” Angle }}</td>
of internal <td >{{ ( f l o a t )
f r i c t i o n ”>& $shallows [ $i
Phi ; </a></th> ]−>
<th><a data−t o g g l e shallow gamma1
=” t o o l t i p ” }}</td>
t i t l e =” S o i l <td >{{ ( f l o a t )
bearing $shallows [ $i
capacity ]−>
f a c t o r s whose shallow gamma2
values }}</td>
depend on t h e <td >{{ ( f l o a t )
angle of $shallows [ $i
internal ]−> s h a l l o w f s
f r i c t i o n ”>N< }}</td>
sub>c</sub></ </t r >
a></th> </tbody>
<th><a data−t o g g l e </ t a b l e >
=” t o o l t i p ” <t a b l e c l a s s=” t a b l e t a b l e −
t i t l e =” S o i l s t r i p e d t a b l e −h o v e r ”>
bearing <thead>
capacity <t r >
f a c t o r s whose <th><a data−t o g g l e
values =” t o o l t i p ”
depend on t h e t i t l e =” Depth
angle of of footing
internal below l o w e s t
f r i c t i o n ”>N< adjacent s o i l
sub>γ </ s u r f a c e ”>D<
sub></a></th> sub>f </sub></
<th><a data−t o g g l e a></th>
=” t o o l t i p ” <th><a data−t o g g l e
t i t l e =” S o i l =” t o o l t i p ”
bearing t i t l e =”Number
capacity o f b l o w s ”>
f a c t o r s whose SPT N−v a l u e </
values a></th>
depend on t h e <th>S o i l Type</th>
angle of <th><a data−t o g g l e
internal =” t o o l t i p ”
f r i c t i o n ”>N< t i t l e =”
sub>q</sub></ Cohesion o f
a></th> the s o i l
<th><a data−t o g g l e below f o o t i n g
=” t o o l t i p ” l e v e l ”>c</a
t i t l e =” ></th>
Effective <th><a data−t o g g l e
unit weight =” t o o l t i p ”
o f s o i l below t i t l e =”
footing Ultimate
l e v e l ”>&gamma gross bearing
;< sub >1</sub capacity or
></a></th> s o i l −b e a r i n g
<th><a data−t o g g l e p r e s s u r e ”>q<
=” t o o l t i p ” sub>u l t </sub
208
></a></th> < l i ><a c l a s s=” c o l l a p s e −
<th><a data−t o g g l e l i n k ”><i c l a s s=” f a f a
=” t o o l t i p ” −c h e v r o n−up”></i ></a>
t i t l e =” D e s i g n </ l i >
bearing < l i c l a s s=” dropdown ”>
c a p a c i t y ”>q</ <a h r e f=”#” c l a s s=”
a></th> dropdown−t o g g l e ”
</t r > data−t o g g l e=”
</thead> dropdown ” r o l e=”
<tbody> button ” aria −
<?php $ j = 0 ?> expanded=” f a l s e ”
@foreach ( $ shallows as ><i c l a s s=” f a f a −
$shallow ) wrench ”></i ></a>
@ i f ( $ s h a l l o w −>b h i d <u l c l a s s=” dropdown−
=== $ b o r e h o l e −>i d menu” r o l e=”menu”
) >
<?php ( $ s h a l l o w −> < l i ><a h r e f=”#”>
shallow is chosen S e t t i n g s 1</a
== 1 ) ? $ c l a s s = >
” chosen ” : </ l i >
$ c l a s s = ” ” ?> < l i ><a h r e f=”#”>
<t r c l a s s=” {{ $ c l a s s S e t t i n g s 2</a
}} ”> >
<td >{{ ( f l o a t ) </ l i >
$samples [ $ j </u l >
]−> s a m p l e t o </ l i >
}}</td> </u l >
<td >{{ ( f l o a t ) <d i v c l a s s=” c l e a r f i x ”></d i v>
$samples [ $ j </d i v>
]−> <d i v c l a s s=” x c o n t e n t ”>
sample num of blows @ i f ( $ c o u n t s == 0 )
}}</td> <h4 a l i g n=” c e n t e r ”>There a r e
<td >{{ ( $ s h a l l o w −> no e x i s t i n g s a m p l e s . </h4>
shallow soil @else
== 0 ) ? ’ c l a y ’ : <d i v i d=” c a n v a s d i v ”>
’ s i l t ’ }}</td @for ( $ i = 0 ; $ i < s i z e o f (
> $boreholes info ) ; $i
<td >{{ ( f l o a t ) ++)
$ s h a l l o w −> <c e n t e r >
shallow c <c a n v a s i d=” b h c a n v a s
}}</td> {{ $ i }} ” w i d t h=”
<td >{{ ( f l o a t ) 1000 ” h e i g h t=”
$ s h a l l o w −> 1225 ” s t y l e=”
shallow qult margin−t o p : 1 5 px ; ”
}}</td> ></c a n v a s>
<td >{{ ( f l o a t ) </ c e n t e r >
$ s h a l l o w −> <b r />
shallow q @endfor
}}</td> </d i v>
</t r > @endif
@endif <d i v c l a s s=” l n s o l i d ”></d i v>
<?php $ j++ ?> </d i v>
@endforeach </d i v>
</tbody> </d i v>
</ t a b l e > </d i v>
<b r/> @endsection
@endforeach @section ( ’ j s ’ )
<d i v c l a s s=” l n s o l i d ”></d i v> @parent
{ ! ! Form : : open ( [ ’ method ’ => ’ < s c r i p t t y p e=” t e x t / j a v a s c r i p t ”>
DELETE ’ , ’ r o u t e ’ => [ ’ v a r p r o j e c t = <?php echo j s o n e n c o d e (
shallows . destroy ’ , $ p r o j e c t ) ? >;
$ p r o j e c t −>i d ] , ’ o n su b m it ’ v a r c o u n t s = <?php echo j s o n e n c o d e (
=> ’ r e t u r n c o n f i r m ( ” $ c o u n t s ) ? >;
D e l e t e SBC d a t a f o r v a r s a m p l e s i n f o = <?php echo j s o n e n c o d e (
shallow foundation $ s a m p l e s i n f o ) ? >;
permanently ?”) ’ ] ) ! ! } v a r b o r e h o l e s i n f o = <?php echo
{ ! ! Form : : s u b m i t ( ’ D e l e t e ’ , [ ’ j s o n e n c o d e ( $ b o r e h o l e s i n f o ) ? >;
c l a s s ’ => ’ btn btn−d a n g e r
’ ]) !!} f u n c t i o n drawTable ( b h i n f o , cnv ) {
<a h r e f=” {{ r o u t e ( ’ s h a l l o w s . var gridOptions = {
e d i t ’ , $ p r o j e c t −>i d ) }} ” constants : {
c l a s s=” btn btn−i n f o ” // G e n e r a l c o n s t a n t s
s t y l e=” f l o a t : r i g h t ”><i text padding : 3 ,
c l a s s=” f a f a −e d i t m−r i g h t c a n v a s w i d t h : cnv . width ,
−x s ”></i > E d i t </a> c a n v a s h e i g h t : cnv . h e i g h t ,
{ ! ! Form : : c l o s e ( ) ! ! }
@endif // H e a d e r c o n s t a n t s
</d i v> h e a d e r c o l s w i d t h : 1000/3 ,
</d i v> header cols num : 3 ,
</d i v> h e a d e r c o l s s e p a r a t i o n : cnv .
</d i v> w i d t h / 3 , //
@endsection header cols width /
header cols num
header rows num : 7 ,
Listing 112: subreports/cre- hea der row s sep arati on : 23 ,
ateBL.blade.php // T a b l e h e a d e r c o n s t a n t s
t a b l e s t a r t y : 275 ,
@extends ( ’ l a y o u t s / m a s t e r ’ ) t a b l e h e a d e r s t a r t y : 161 ,
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) t a b l e h e a d e r w i d t h : 1 1 4 , //
@section ( ’ content ’ ) table start y −
<d i v c l a s s=” row ”> table header start y
<d i v c l a s s=” c o l −md−12”>
<d i v c l a s s=” x p a n e l ”> // Column c o n s t a n t s
<d i v c l a s s=” x t i t l e ”> s c a l e : 2 0 0 / 6 0 , // c o l s b w i d t h /
<h2>Add/ Update B o r e h o l e Log</ 60; colsb scale
h2> colsa num : 8 ,
<u l c l a s s=” nav navbar−r i g h t colsb num : 12 ,
p a n e l t o o l b o x ”> colsc num : 3 ,
209
c o l s a w i d t h : 45 ∗ 8 , // run len : run len ,
colsa separation ∗ sample len : sample len ,
colsa num rec percent : rec percent ,
colsb width : 200 , uscs : uscs ,
c o l s c w i d t h : 440 , spt : spt ,
c o l s a s e p a r a t i o n : 45 , color : color ,
c o l s b s e p a r a t i o n : 2 0 0 / 1 2 , // descr : descr ,
c o l s b w i d t h / colsb num other : other
c o l s c s e p a r a t i o n : 4 4 0 / 3 , // };
c o l s c w i d t h / colsc num
colsb header num : 7 , drawLines ( ctx , g r i d O p t i o n s . c o n s t a n t s ,
num of samples ) ;
// C o l o r c o n s t a n t s addHeaders ( ctx , g r i d O p t i o n s . c o n s t a n t s ,
major lines color : ’ #000000 ’ , num of samples , headers ,
minor lines color : ’#D3D3D3 ’ table headers ) ;
} i f ( s a m p l e s i n f o . length > 0) {
}; addData ( c t x , g r i d O p t i o n s . c o n s t a n t s
, num of samples , data ) ;
v a r c t x = cnv . g e t C o n t e x t ( ’ 2d ’ ) ; }
var num of samples = b h i n f o [ ’
bh num of samples ’ ] ; return ;
}
var t a b l e h e a d e r s = [ ” Depth (m) ” , ”
Type o f S a m p l i n g ” , ”From (m) ” , ”To f u n c t i o n drawLines ( ctx , grid options ,
(m) ” , ” Len . o f Run (m) ” , ” Len . o f num of samples ) {
Sample (m) ” , ” Rec . %” , ”USCS” , ” var i = n u l l ;
Color ” , ” S o i l D e s c r i p t i o n ” , ” var x = n u l l ;
Other T e s t R e s u l t s ” ] ; var y = n u l l ;
var headers = [ ” P r o j e c t : ” + p r o j e c t [ ’ var c t r = n u l l ;
proj name ’ ] , ” Location : ” +
project [ ’ proj location ’ ] , ” ctx . s t r o k e S t y l e = g r i d o p t i o n s .
B o r e h o l e No . : ” + b h i n f o [ ’ bh num major lines color ;
’ ] , ” Date S t a r t e d : ” + b h i n f o [ ’ ctx . beginPath ( ) ;
b h s t a r t d a t e ’ ] , ” Date F i n i s h e d :
” + bh info [ ’ bh end date ’ ] , ” // Draw h e a d e r v e r t i c a l l i n e s
Weather : ” + b h i n f o [ ’ b h w e a t h e r ’ f o r ( i = 0 ; i <= g r i d o p t i o n s .
] , ” Surface Elevation : ” + h e a d e r c o l s s e p a r a t i o n ; i ++) {
bh info [ ’ bh surface elevation ’ ] , x = i ∗ grid options .
” Water E l e v a t i o n : ” + b h i n f o [ ’ header cols separation ;
b h w a t e r e l e v a t i o n ’ ] , ” Total switch ( i ) {
B o r i n g Depth : ” + b h i n f o [ ’ case 0 : c t x . moveTo ( x , 0 ) ;
bh max depth ’ ] , ” H e i g h t o f Drop : break ;
” + bh info [ ’ bh height of drop ’ ] , case 1 : c t x . moveTo ( x ,
”Hammer Weight : ” + b h i n f o [ ’ grid options .
bh hammer weight ’ ] , ” D r i l l Rig : ” header rows separation ) ;
+ bh info [ ’ b h d r i l l r i g ’ ] , ” break ;
D r i l l Pump : ” + b h i n f o [ ’ case 2 : c t x . moveTo ( x , 2∗
bh drill pump ’ ] , ” Operator : ” + grid options .
bh info [ ’ bh operator ’ ] , ” header rows separation ) ;
Inspector : ” + bh info [ ’ break ;
b h i n s p e c t o r ’ ] , ” Casing : ” + case 3 : c t x . moveTo ( x , 0 ) ;
b h i n f o [ ’ b h c a s i n g ’ ] +” | Rod : ” + break ;
b h i n f o [ ’ b h r o d ’ ] + ” | Sampler : ” }
+ b h i n f o [ ’ b h s a m p l e r ’ ] , ”Type o f
Sampling : ” ] ; ctx . lineTo (x , g r i d o p t i o n s .
table header start y ) ;
var d from = [ ] ; }
var d to = [ ] ;
var run len = [ ] ; // Draw h e a d e r h o r i z o n t a l l i n e s
var sample len = [ ] ; for ( i = 0 ; i < g r i d o p t i o n s .
var rec percent = [ ] ; h e a d e r r o w s n u m ; i ++) {
var uscs = [ ] ; y = i ∗ grid options .
var color = [ ] ; header rows separation ;
var descr = [ ] ; c t x . moveTo ( 0 , y ) ;
var other = [ ] ; ctx . lineTo ( g r i d o p t i o n s .
var spt = [ 0 ] ; canvas width , y ) ;
}
for ( i = 0 ; i < s a m p l e s i n f o . length ; i
++) { // Draw main t a b l e l i n e s
i f ( s a m p l e s i n f o [ i ] [ ’ b h i d ’ ] == // Draw m a j o r v e r t i c a l l i n e s
bh info [ ’ id ’ ] ) { // Draw c o l s a b o r d e r s
d f r o m . push ( s a m p l e s i n f o [ i ] [ ’ f o r ( i = 0 ; i <= g r i d o p t i o n s .
sample from ’ ] ) ; c o l s a n u m ; i ++) {
d t o . push ( s a m p l e s i n f o [ i ] [ ’ x = i ∗ grid options .
sample to ’ ] ) ; colsa separation ;
s p t . push ( s a m p l e s i n f o [ i ] [ ’ c t x . moveTo ( x , g r i d o p t i o n s .
sample num of blows ’ ] ) ; table header start y ) ;
r u n l e n . push ( s a m p l e s i n f o [ i ] [ ’ ctx . lineTo (x , g r i d o p t i o n s .
sample run length ’ ] ) ; canvas height ) ;
s a m p l e l e n . push ( s a m p l e s i n f o [ i }
] [ ’ sample sample length ’
]) ; // Draw c o l s c b o r d e r s
r e c p e r c e n t . push ( s a m p l e s i n f o [ f o r ( i = 0 ; i <= g r i d o p t i o n s .
i ] [ ’ sample rec percent ’ ]) c o l s c n u m ; i ++) {
; x = grid options . colsa width +
u s c s . push ( s a m p l e s i n f o [ i ] [ ’ grid options . colsb width + ( i
uscs id ’ ]) ; ∗ grid options .
c o l o r . push ( s a m p l e s i n f o [ i ] [ ’ colsc separation ) ;
sample color ’ ] ) ; c t x . moveTo ( x , g r i d o p t i o n s .
d e s c r . push ( s a m p l e s i n f o [ i ] [ ’ table header start y ) ;
uscs description ’ ]) ; ctx . lineTo (x , g r i d o p t i o n s .
o t h e r . push ( s a m p l e s i n f o [ i ] [ ’ canvas height ) ;
sample other results ’ ]) ; }
}
} // Draw m a j o r h o r i z o n t a l l i n e s
c t x . moveTo ( 0 , g r i d o p t i o n s .
var data = { table header start y ) ;
d from : d from , ctx . lineTo ( g r i d o p t i o n s . canvas width ,
d to : d to , grid options . table header start y
210
); }
f o r ( i = 0 ; i <= n u m o f s a m p l e s ; i ++) x = 2∗ g r i d o p t i o n s .
{ header cols separation +
y = i ∗ grid options . grid options . text padding ;
colsa separation + ctx . f i l l T e x t ( headers [ i +2] , x , y ) ;
grid options . table start y ;
c t x . moveTo ( 0 , y ) ; c t r ++;
ctx . lineTo ( g r i d o p t i o n s . }
canvas width , y ) ;
} // Add t a b l e h e a d e r
// Add c o l s a h e a d e r
c t x . moveTo ( 0 , g r i d o p t i o n s . ctx . f o n t = ”9 pt A r i a l ” ;
canvas height ) ; ctx . t e x t B a s e l i n e = ” middle ” ;
ctx . lineTo ( g r i d o p t i o n s . canvas width , y = grid options . table start y −
grid options . canvas height ) ; grid options . text padding ;
for ( i = 0 ; i < g r i d o p t i o n s . colsa num
ctx . lineWidth = 2 ; ; i ++) {
ctx . stroke () ; ctx . save ( ) ;
ctx . closePath () ; x = ( i ∗grid options .
colsa separation ) + (
// Draw minor v e r t i c a l l i n e s grid options . colsa separation
ctx . s t r o k e S t y l e = g r i d o p t i o n s . /2) ;
minor lines color ; ctx . t r a n s l a t e (x , y) ;
ctx . beginPath ( ) ; c t x . r o t a t e ( −90∗Math . PI / 1 8 0 ) ;
for ( i = 1 ; i < g r i d o p t i o n s . colsb num c t x . t r a n s l a t e (−x,−y ) ;
; i ++) { ctx . f i l l T e x t ( ta bl e h ea de rs [ i ] , x ,
x = grid options . colsa width + ( i y) ;
∗ grid options . ctx . r e s t o r e () ;
colsb separation ) ; }
c t x . moveTo ( x , g r i d o p t i o n s .
table start y ) ; // Add c o l s b h e a d e r
ctx . lineTo (x , ( num of samples ) ∗ c t x . f o n t = ” 10 p t A r i a l ” ;
grid options . colsa separation ctx . textAlign = ” center ” ;
+ grid options . table start y ctx . t e x t B a s e l i n e = ” middle ” ;
); x = grid options . colsa width + (
} g r i d o p t i o n s . colsb width /2) ;
y = ( grid options . table start y −
ctx . lineWidth = 2 ; grid options . text padding ) − (
ctx . stroke () ; grid options . table header width
ctx . closePath () ; /2) ;
c t x . f i l l T e x t ( ”SPT N−Value ” , x , y ) ;
return ;
} ctx . textAlign = ” center ” ;
ctx . t e x t B a s e l i n e = ” bottom ” ;
f u n c t i o n addHeaders ( ctx , g r i d o p t i o n s , y = grid options . table start y ;
num of samples , headers , for ( i = 0; i < grid options .
table headers ) { c o l s b h e a d e r n u m ; i ++) {
c t x . f o n t = ” 11 p t A r i a l ” ; x = grid options . colsa width + ( i
c t x . t e x t B a s e l i n e = ” bottom ” ; ∗2∗ g r i d o p t i o n s .
ctx . textAlign = ” center ” ; colsb separation ) ;
c t x . f i l l T e x t ( ”BOREHOLE LOG” , i f ( i == 0 ) {
g r i d o p t i o n s . canvas width /2 , ctx . textAlign = ” l e f t ” ;
grid options . }
header rows separation ) ; e l s e i f ( i == 6 ) {
ctx . textAlign = ” r i g h t ” ;
ctx . textAlign = ” s t a r t ” ; }
else {
y = 2 ∗ grid options . ctx . textAlign = ” center ” ;
header rows separation ; }
x = grid options . text padding ; ctx . f i l l T e x t ( ( i ) ∗10 , x , y ) ;
ctx . f i l l T e x t ( headers [ 0 ] , x , y) ;
ctx . f i l l T e x t ( headers [ 1 ] , g r i d o p t i o n s . }
header cols separation + x , y) ;
// Add c o l s c h e a d e r
// Add t o p h e a d e r ctx . textAlign = ” center ” ;
ctr = 0; ctx . t e x t B a s e l i n e = ” middle ” ;
for ( i = 2 ; i < headers . length ; i = i y = ( grid options . table start y −
+ 3) { grid options . text padding ) − (
y = ( c t r +3) ∗ g r i d o p t i o n s . grid options . table header width
header rows separation ; /2) ;
x = grid options . text padding ; f o r ( i = 0 ; i <= g r i d o p t i o n s .
ctx . f i l l T e x t ( headers [ i ] , x , y) ; c o l s c n u m ; i ++) {
x = grid options . colsa width +
if ( i + 1 == 1 5 ) { grid options . colsb width + ( i
var r e s = headers [ i +1]. s p l i t ( ” ∗ grid options .
|”) ; colsc separation ) + (
x = grid options . grid options . colsc separation
header cols separation + /2) ;
grid options . text padding ctx . f i l l T e x t ( ta bl e h ea de rs [ i + 8 ] ,
; x , y) ;
ctx . f i l l T e x t ( res [ 0 ] , x , y) ; }
211
x = grid options . text padding ; grid options . text padding ;
y = i ∗ grid options . y = i ∗ grid options .
colsa separation + colsa separation +
grid options . table start y ; grid options . table start y ;
ctx . f i l l T e x t ( data . d t o [ c t r ] , x , y ) ctx . f i l l T e x t ( data . c o l o r [ c t r ] , x , y
; );
212
<d i v c l a s s=” c o l −md−12”>
<d i v c l a s s=” x p a n e l ”> var d from = [ ] ;
<d i v c l a s s=” x t i t l e ”> var d to = [ ] ;
<h2>Add S o i l P r o f i l e </h2> var run length = [ ] ;
<u l c l a s s=” nav navbar−r i g h t var uscs = [ ] ;
p a n e l t o o l b o x ”> var spt = [ 0 ] ;
< l i ><a c l a s s=” c o l l a p s e −
l i n k ”><i c l a s s=” f a f a for ( i = 0 ; i < s a m p l e s i n f o . length ; i
−c h e v r o n−up”></i ></a> ++) {
</ l i > i f ( s a m p l e s i n f o [ i ] [ ’ b h i d ’ ] ==
< l i c l a s s=” dropdown ”> bh info [ ’ id ’ ] ) {
<a h r e f=”#” c l a s s=” d f r o m . push ( s a m p l e s i n f o [ i ] [ ’
dropdown−t o g g l e ” sample from ’ ] ) ;
data−t o g g l e=” d t o . push ( s a m p l e s i n f o [ i ] [ ’
dropdown ” r o l e=” sample to ’ ] ) ;
button ” aria − r u n l e n g t h . push ( s a m p l e s i n f o [ i
expanded=” f a l s e ” ] [ ’ sample run length ’ ] ) ;
><i c l a s s=” f a f a − u s c s . push ( s a m p l e s i n f o [ i ] [ ’
wrench ”></i ></a> uscs id ’ ]) ;
<u l c l a s s=” dropdown− s p t . push ( s a m p l e s i n f o [ i ] [ ’
menu” r o l e=”menu” sample num of blows ’ ] ) ;
> }
< l i ><a h r e f=”#”> }
S e t t i n g s 1</a
> v a r b h m i n d e p t h = Math . min . a p p l y ( n u l l
</ l i > , d from ) ;
< l i ><a h r e f=”#”>
S e t t i n g s 2</a var data = {
> d from : d from ,
</ l i > d to : d to ,
</u l > run length : run length ,
</ l i > uscs : uscs ,
</u l > spt : spt ,
<d i v c l a s s=” c l e a r f i x ”></d i v>
</d i v> min depth : bh min depth ,
<d i v c l a s s=” x c o n t e n t ”> max depth : max depth ,
@ i f ( $ c o u n t s == 0 ) water elevation : water elevation ,
<h4 a l i g n=” c e n t e r ”>There a r e num of samples : num of samples ,
no e x i s t i n g s a m p l e s . </h4> };
@else
<d i v i d=” c a n v a s d i v ”> if (num == 1 ) {
<?php start x = grid options . bh1 start x
$num of bh = $ p r o j e c t ;
−> }
proj num of boreholes else {
; start x = grid options . bh2 start x
$num of canvas = c e i l ( ;
$num of bh /2) ; }
?>
@for ( $ i = 0 ; $ i < var add y = drawLines ( ctx ,
$ n u m o f c a n v a s ; $ i ++) g r i d o p t i o n s , data , s t a r t x ,
<c e n t e r > min depth ) ;
<c a n v a s i d=” b h c a n v a s a d d H e a d e r s ( c t x , g r i d o p t i o n s , data ,
{{ $ i }} ” w i d t h=” headers , t a b l e h e a d e r s , s t a r t x ,
1000 ” h e i g h t=” min depth , a d d y ) ;
1225 ” s t y l e=” i f ( s a m p l e s i n f o . length > 0) {
margin−t o p : 1 5 px ; ” addData ( c t x , g r i d o p t i o n s ,
></c a n v a s> n u m o f s a m p l e s , data , s t a r t x
</ c e n t e r > , min depth , a d d y ) ;
<b r /> }
@endfor
</d i v> return ;
@endif }
<d i v c l a s s=” l n s o l i d ”></d i v>
</d i v> f u n c t i o n drawLines ( ctx , g r i d o p t i o n s , data
</d i v> , s t a r t x , min depth ) {
</d i v> ctx . s t r o k e S t y l e = g r i d o p t i o n s .
</d i v> major lines color ;
@endsection ctx . beginPath ( ) ;
@section ( ’ j s ’ )
@parent // Draw v e r t i c a l l i n e s
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”> f o r ( i = 0 ; i <= g r i d o p t i o n s .
v a r p r o j e c t = <?php echo j s o n e n c o d e ( c o l s a n u m ; i ++) {
$ p r o j e c t ) ? >; x = start x + ( i ∗ grid options .
v a r c o u n t s = <?php echo j s o n e n c o d e ( colsa separation ) ;
$ c o u n t s ) ? >; c t x . moveTo ( x , g r i d o p t i o n s .
v a r s a m p l e s i n f o = <?php echo j s o n e n c o d e ( table header start y ) ;
$ s a m p l e s i n f o ) ? >; ctx . lineTo (x , g r i d o p t i o n s .
v a r b o r e h o l e s i n f o = <?php echo rows end ) ;
j s o n e n c o d e ( $ b o r e h o l e s i n f o ) ? >; }
v a r n u m o f c a n v a s = <?php echo j s o n e n c o d e
( $ n u m o f c a n v a s ) ? >; x = x + grid options . colsb width ;
c t x . moveTo ( x , g r i d o p t i o n s .
f u n c t i o n d r a w P r o f i l e ( cnv , g r i d o p t i o n s , table header start y ) ;
b h i n f o , num , m i n d e p t h ) { ctx . lineTo ( x , g r i d o p t i o n s . rows end ) ;
v a r c t x = cnv . g e t C o n t e x t ( ’ 2d ’ ) ; // Draw h e a d e r h o r i z o n t a l l i n e s
v a r max depth = b h i n f o [ ’ bh max depth ’ var add y = 0 ;
]; i f ( data . min depth > min depth ) {
var w a t e r e l e v a t i o n = b h i n f o [ ’ x = start x ;
bh water elevation ’ ] ; add y = ( data . min depth −
var num of samples = b h i n f o [ ’ min depth ) ∗ ( g r i d o p t i o n s .
bh num of samples ’ ] ; rows separation /0.3) ;
v a r h e a d e r s = [ ” B o r e h o l e No . ” + y = g r i d o p t i o n s . min depth y +
b h i n f o [ ’ bh num ’ ] , ” Ground add y ;
E l e v a t i o n ” , ” Depth : ” + max depth c t x . moveTo ( x − ( 3 ∗ g r i d o p t i o n s .
+ ” m. ” ] ; extra line x ) , y) ;
v a r t a b l e h e a d e r s = [ ” Depth (m) ” , ” ctx . lineTo ( x − (2∗ g r i d o p t i o n s .
Symbol ” , ”USCS” ] ; extra line x ) , y) ;
213
c t x . moveTo ( x , y ) ; y = g r i d o p t i o n s . min depth y +
ctx . lineTo (x + g r i d o p t i o n s . add y ;
cols width , y) ; ctx . f i l l T e x t ( data . min depth .
} toPrecision (2) , x , y) ;
}
x = start x ;
y = grid options . table header start y ; // Water e l e v a t i o n l a b e l
c t x . moveTo ( x , y ) ; x = start x + grid options .
ctx . lineTo (x + g r i d o p t i o n s . cols width text padding − (2∗ g r i d o p t i o n s .
, y) ; extra line x ) ;
var add y min depth = min depth ∗ (
y = grid options . table start y ; grid options . rows separation /0.3)
c t x . moveTo ( x , y ) ; ;
ctx . lineTo (x + g r i d o p t i o n s . cols width y = g r i d o p t i o n s . min depth y + ( ( data .
, y) ; water elevation ) ∗ ( grid options .
rows separation /0.3) ) −
y = g r i d o p t i o n s . min depth y + add y min depth ;
grid options . rows height ; ctx . f i l l T e x t ( data . w a t e r e l e v a t i o n , x ,
c t x . moveTo ( x , y ) ; y) ;
ctx . lineTo (x + g r i d o p t i o n s . cols width
, y) ; // Add t a b l e h e a d e r
// Add f i r s t t h r e e h e a d e r s
ctx . lineWidth = 2 ; c t x . f o n t = ” 11 p t A r i a l ” ;
ctx . stroke () ; y = grid options . table start y −
ctx . closePath () ; grid options . text padding ;
f o r ( i = 0 ; i < 3 ; i ++) {
// Draw w a t e r e l e v a t i o n line ctx . save ( ) ;
ctx . beginPath ( ) ; x = start x + ( i ∗grid options .
colsa separation ) + (
x = start x ; grid options . colsa separation
var add y min depth = min depth ∗ ( /2) ;
grid options . rows separation /0.3) ctx . t r a n s l a t e (x , y) ;
; c t x . r o t a t e ( −90∗Math . PI / 1 8 0 ) ;
y = g r i d o p t i o n s . min depth y + ( ( data . c t x . t r a n s l a t e (−x,−y ) ;
water elevation ) ∗ ( grid options . ctx . f i l l T e x t ( ta bl e h ea de rs [ i ] , x ,
rows separation /0.3) ) − y) ;
add y min depth ; ctx . r e s t o r e () ;
c t x . moveTo ( x − ( 3 ∗ g r i d o p t i o n s . }
extra line x ) , y) ;
ctx . lineTo ( x − (2∗ g r i d o p t i o n s . // Add l a s t h e a d e r
extra line x ) , y) ; ctx . textAlign = ” center ” ;
c t x . moveTo ( x , y ) ; ctx . t e x t B a s e l i n e = ” middle ” ;
ctx . lineTo (x + g r i d o p t i o n s . cols width x = start x + grid options . colsa width
+ grid options . extra line x , y) ; + ( g r i d o p t i o n s . colsb width /2) ;
y = ( grid options . table start y −
ctx . lineWidth = 3 ; grid options . text padding ) − (
ctx . stroke () ; grid options . table header width
ctx . closePath () ; /2) ;
c t x . f i l l T e x t ( ”SPT N−Value ” , x , y ) ;
// Draw minor v e r t i c a l l i n e s
ctx . s t r o k e S t y l e = g r i d o p t i o n s . ctx . f o n t = ” 10 p t A r i a l ” ;
minor lines color ; ctx . textAlign = ” center ” ;
ctx . beginPath ( ) ; ctx . t e x t B a s e l i n e = ” bottom ” ;
y = grid options . table start y ;
for ( i = 1 ; i < g r i d o p t i o n s . colsb num for ( i = 0; i < grid options .
; i ++) { c o l s b h e a d e r n u m ; i ++) {
x = start x + grid options . x = start x + grid options .
colsa width + ( i ∗ c o l s a w i d t h + ( i ∗2∗
grid options . colsb separation grid options . colsb separation
); );
c t x . moveTo ( x , g r i d o p t i o n s . i f ( i == 0 ) {
table start y ) ; ctx . textAlign = ” l e f t ” ;
ctx . lineTo (x , g r i d o p t i o n s . }
rows end ) ; e l s e i f ( i == 6 ) {
} ctx . textAlign = ” r i g h t ” ;
}
ctx . lineWidth = 2 ; else {
ctx . stroke () ; ctx . textAlign = ” center ” ;
ctx . closePath () ; }
ctx . f i l l T e x t ( ( i ) ∗10 , x , y ) ;
r e t u r n add y ; }
}
return ;
f u n c t i o n addHeaders ( ctx , g r i d o p t i o n s , }
data , h e a d e r s , t a b l e h e a d e r s , s t a r t x
, min depth , a d d y ) { f u n c t i o n addData ( c t x , g r i d o p t i o n s ,
c t x . f o n t = ” 11 p t A r i a l ” ; n u m o f s a m p l e s , data , s t a r t x ,
c t x . t e x t B a s e l i n e = ” bottom ” ; min depth , a d d y ) {
ctx . textAlign = ” s t a r t ” ; c t x . f o n t = ” 11 p t A r i a l ” ;
ctx . textAlign = ” s t a r t ” ;
// Add t o p h e a d e r
x = start x ; ctx . s t r o k e S t y l e = g r i d o p t i o n s .
f o r ( i = 1 ; i <= g r i d o p t i o n s . major lines color ;
h e a d e r r o w n u m ; i ++) { ctx . beginPath ( ) ;
y = i ∗ grid options .
header row separation ; c t x . t e x t B a s e l i n e = ” bottom ” ;
ctx . f i l l T e x t ( headers [ i −1] , x , y ) ;
} // S y m b o l c o l u m
var s o u r c e s = {};
// Minimum d e p t h l a b e l f o r ( i = 0 ; i < n u m o f s a m p l e s ; i ++) {
ctx . f o n t = ”8 pt A r i a l ” ; v a r s o u r c e v a r = ’ s a m p l e ’ + ( i +1) ;
ctx . t e x t B a s e l i n e = ” middle ” ; sources [ source var ] = ’ . . / . . /
x = x + grid options . text padding − images / u s c s / ’ + data . u s c s [ i ]
(2∗ g r i d o p t i o n s . e x t r a l i n e x ) ; + ’ . png ’ ;
y = g r i d o p t i o n s . min depth y ; }
ctx . f i l l T e x t ( min depth . t o P r e c i s i o n ( 2 ) ,
x , y) ; rows sep = 0;
// Draw i m a g e s f o r s y m b o l column
if ( data . min depth > min depth ) { loadImages ( sources , f u n c t i o n ( images ) {
214
for ( i = 0 ; i < num of samples ; i ctx . stroke () ;
++) { ctx . closePath () ;
s o u r c e v a r = ’ s a m p l e ’ + ( i +1) ;
x = start x + grid options . return ;
colsa separation ; }
// r o w s s e p = r o w s s e p +
grid options . f u n c t i o n d r a w C a n v a s L i n e s ( cnv , g r i d o p t i o n s
r o w s s e p a r a t i o n ∗( data . , bh1 num , bh2 num , m i n d e p t h ) {
run length [ ctr +1]/0.3) ; v a r c t x = cnv . g e t C o n t e x t ( ’ 2d ’ ) ;
// y = r o w s s e p + g r i d o p t i o n s .
min depth y + add y ; ctx .
f o n t = ” 13 p t A r i a l ” ;
y = ( i ∗ grid options . ctx .
textAlign = ” start ” ;
rows separation ) + ctx .
t e x t B a s e l i n e = ” bottom ” ;
g r i d o p t i o n s . min depth y ctx strokeStyle = grid options .
.
+ add y ; major lines color ;
c t x . drawImage ( i m a g e s [ ctx . beginPath ( ) ;
source var ] , x , y ,
grid options . // Draw minimum d e p t h l i n e
colsa separation , y = g r i d o p t i o n s . min depth y ;
grid options . c t x . moveTo ( 0 , y ) ;
rows separation ) ; ctx . lineTo ( g r i d o p t i o n s . bh1 start x −
} (2∗ g r i d o p t i o n s . e x t r a l i n e x ) , y )
}) ; ;
c t x . moveTo ( g r i d o p t i o n s . b h 1 s t a r t x , y
ctr = 0; );
rows sep = 0; ctx . lineTo ( g r i d o p t i o n s . bh2 start x −
f o r ( i = 1 ; i <= n u m o f s a m p l e s ; i ++) (2∗ g r i d o p t i o n s . e x t r a l i n e x ) , y )
{ ;
// D e p t h column c t x . moveTo ( g r i d o p t i o n s . b h 2 s t a r t x , y
x = start x + grid options . );
text padding ; ctx . lineTo ( g r i d o p t i o n s . canvas width ,
rows sep = rows sep + grid options y) ;
. r o w s s e p a r a t i o n ∗( data .
run length [ ctr ]/0.3) ; ctx . lineWidth = 3 ;
y = rows sep + grid options . ctx . stroke () ;
min depth y + add y ; ctx . closePath () ;
ctx . f i l l T e x t ( data . d t o [ c t r ] , x , y )
; ctx . beginPath ( ) ;
// Draw h o r i z o n t a l l i n e s // Draw f o o t e r
c t x . moveTo ( x − g r i d o p t i o n s . x = grid options . footer start x ;
text padding , y) ; y = grid options . footer start y ;
ctx . lineTo (x − g r i d o p t i o n s . c t x . moveTo ( x , y ) ;
text padding + grid options . c t x . a r c ( x + 5 0 , y , 5 0 , 0 , 2 ∗ Math . PI ,
cols width , y) ; true ) ;
ctx . lineTo (x + g r i d o p t i o n s .
// USCS column footer width , y) ;
x = s t a r t x + 2∗ g r i d o p t i o n s .
colsa separation + if ( bh1 num == 0 ) {
grid options . text padding ; bh1 num = ’ ’ ;
y = rows sep + grid options . }
min depth y + add y ; if ( bh2 num == 0 ) {
ctx . f i l l T e x t ( data . u s c s [ c t r ] , x , y ) bh2 num = ’ ’ ;
; }
var f o o t e r t e x t = ’ SOIL PROFILE ALONG
// SPT N−v a l u e column BH− ’ + bh1 num + ’ & BH− ’ +
x = s t a r t x + 3∗ g r i d o p t i o n s . bh2 num ;
colsa separation ; ctx . f i l l T e x t ( f o o t e r t e x t , x +
// y = ( i −1) ∗ g r i d o p t i o n s . g r i d o p t i o n s . text padding + 100 ,
rows separation + y) ;
grid options . min depth y +
add y ;
y = rows sep + grid options . ctx . lineWidth = 2 ;
min depth y + add y − ctx . stroke () ;
grid options . rows separation ; ctx . closePath () ;
c t x . moveTo ( x + d a t a . s p t [ c t r ] ∗
grid options . scale , y) ; return ;
c t x . l i n e T o ( x + d a t a . s p t [ c t r +1]∗ }
grid options . scale , y +
grid options . rows separation ) f un c ti o n loadImages ( sources , callback ) {
; var images = {};
// c t x . l i n e T o ( x + d a t a . s p t [ c t r +1]∗ var loadedImages = 0 ;
grid options . scale , y + v a r numImages = 0 ;
grid options . rows separation
∗( data . r u n l e n g t h [ c t r ] / 0 . 3 ) ) ; // Get number o f s o u r c e s
c t x . a r c ( x + d a t a . s p t [ c t r +1]∗ for ( var s r c in s o u r c e s ) {
grid options . scale , y + numImages++;
grid options . rows separation , }
5 , 0 , 2 ∗ Math . PI , true ) ;
ctx . f i l l T e x t ( data . spt [ c t r +1] , x + for ( var s r c in s o u r c e s ) {
d a t a . s p t [ c t r +1]∗ g r i d o p t i o n s . i m a g e s [ s r c ] = new Image ( ) ;
scale + grid options . images [ s r c ] . onload = f u n c t i o n ( ) {
text padding , y + i f (++l o a d e d I m a g e s >= numImages
grid options . rows separation ) ) {
; c a l l b a c k ( images ) ;
}
c t r ++; };
} images [ s r c ] . s r c = s o u r c e s [ s r c ] ;
}
// C o r i n g t e x t }
ctx . textAlign = ” center ” ;
x = start x + ( grid options . cols width v a r c a n v a s d i v = document . g e t E l e m e n t B y I d ( ’
/2) ; canvas div ’ ) ;
y = g r i d o p t i o n s . rows end +
grid options . coring text add y ; if ( c a n v a s d i v !== n u l l ) {
v a r c o r i n g t e x t = ’ C o r i n g up t o ’ + var gridOptions = {
d a t a . max depth + ’ m. ’ ; constants : {
ctx . f i l l T e x t ( coring text , x , y) ; // G e n e r a l c o n s t a n t s
s c a l e : 2 3 0 / 6 0 , // c o l s b w i d t h /
215
60 bh num ’ ] ;
row scale : 5 , for ( i = 0 ; i < s a m p l e s i n f o .
text padding : 3 , l e n g t h ; i ++) {
c a n v a s w i d t h : 1 0 0 0 , // c n v . i f ( samples info [ i ] [ ’ bh id
width ’ ] == bh2 [ ’ i d ’ ] ) {
c a n v a s h e i g h t : 1 2 2 5 , // c n v . m i n d e p t h = Math . min(
height min depth ,
b h 1 s t a r t x : 100 , samples info [ i ] [ ’
b h 2 s t a r t x : 550 , sample from ’ ] ) ;
}
// H e a d e r c o n s t a n t s }
header row num : 3 , }
header row separation : 75/3 , y++;
// t a b l e h e a d e r s t a r t y /3
if ( m i n d e p t h !== Number .
// F o o t e r c o n s t a n t s MAX SAFE INTEGER) {
f o o t e r s t a r t x : 300 , d r a w C a n v a s L i n e s ( cnv ,
f o o t e r s t a r t y : 1100 , gridOptions . constants ,
f o o t e r w i d t h : 400 , bh1 num , bh2 num ,
c o r i n g t e x t a d d y : 20 , min depth ) ;
// T a b l e h e a d e r and l i n e // Draw s o i l p r o f i l e
constants i f ( bh1 !== n u l l ) {
t a b l e s t a r t y : 150 , d r a w P r o f i l e ( cnv ,
t a b l e h e a d e r s t a r t y : 75 , gridOptions . constants
t a b l e h e a d e r w i d t h : 7 5 , // , bh1 , 1 , m i n d e p t h ) ;
table start y − }
table header start y i f ( bh2 !== n u l l ) {
m i n d e p t h y : 1 6 0 , // d r a w P r o f i l e ( cnv ,
t a b l e s t a r t y + 10 gridOptions . constants
e x t r a l i n e x : 15 , , bh2 , 2 , m i n d e p t h ) ;
}
// Column c o n s t a n t s }
colsa num : 3 ,
colsb num : 12 , }
c o l s a w i d t h : 120 , }
colsb width : 230 ,
c o l s a s e p a r a t i o n : 1 2 0 / 3 , //
c o l s a w i d t h / colsa num window . o n l o a d = f u n c t i o n ( ) {
c o l s b s e p a r a t i o n : 2 3 0 / 1 2 , // f o r ( z = 0 ; z < n u m o f c a n v a s ; z++) {
c o l s b w i d t h / colsb num var b h c a n v a s i d = ’ bh canvas ’ + z
colsb header num : 7 , ;
c o l s w i d t h : 3 5 0 , // sum o f v a r cnv = document . g e t E l e m e n t B y I d (
c o l s x w i d t h ; t a b l e width bh canvas id ) ;
216
button ” aria − <p><l a b e l >L o c a t i o n : </ l a b e l
expanded=” f a l s e ” > {{ $ p r o j e c t −>
><i c l a s s=” f a f a − p r o j l o c a t i o n }}</p>
wrench ”></i ></a> </d i v>
<u l c l a s s=” dropdown− <d i v c l a s s=” c o l −md−4 c o l −md−4
menu” r o l e=”menu” c o l −xs −12 normal−f o n t ”
> s t y l e=” margin− l e f t : 5 0 px ”>
< l i ><a h r e f=”#”> <p><l a b e l >Job No. : < / l a b e l >
S e t t i n g s 1</a {{ $sample−>
> s a m p l e j o b n u m }}</p>
</ l i > <p><l a b e l >Date T e s t e d : </
< l i ><a h r e f=”#”> l a b e l > {{ $sample−>
S e t t i n g s 2</a s a m p l e t e s t d a t e }}</
> p>
</ l i > </d i v>
</u l > <?php
</ l i > $bh num = H e l p e r : :
</u l > getBoreholeNum (
<d i v c l a s s=” c l e a r f i x ”></d i v> $sample−>b h i d ) ;
</d i v> $table [ $ctr ] = Helper : :
<d i v c l a s s=” x c o n t e n t ”> g e t D a t a P o i n t s ( $sample
<d i v i d=” c a n v a s d i v ”> −>i d ) ;
<?php $ i = 0 ?> $sample ids [ $ctr ] =
@foreach ( $ b o r e h o l e s i n f o $sample−>i d ;
a s $bh ) json encode ( $table [ $ctr ] ) ;
<?php $ p a t h = ” i m a g e s / ?>
s u b r e p o r t s /BL/bh−$bh <c e n t e r >
−>i d . png ” ?> <d i v i d=” c h a r t d i v {{ $ c t r }}
<c e n t e r ><img s r c=” {{ URL : : ” s t y l e=” margin−t o p
a s s e t ( $ p a t h ) }} ” a l t= : 7 5 px ”></d i v>
” B o r e h o l e Log {{ $ i }} ” </ c e n t e r >
w i d t h=” 1000 ”></ <b r />
center> <c e n t e r ><img i d=” c h a r t i m g {{
<b r /> $ c t r }} ” /></ c e n t e r >
<?php $ i++ ?> <t a b l e c l a s s=” t a b l e t a b l e −
@endforeach n o n f l u i d ” a l i g n=” c e n t e r ”
</d i v> b o r d e r=” 1 ”>
<d i v c l a s s=” l n s o l i d ”></d i v> <thead>
</d i v> <t r >
</d i v> <th>B o r e h o l e No. </
</d i v> th>
</d i v> <th>Sample No. </ th
@endsection >
<th>Depth (m)</th>
<th>S o i l
D e s c r i p t i o n </
Listing 115: subreport- th>
<th>USCS</th>
s/showGSA.blade.php <th>NMC (%)</th>
<th>LL</th>
@extends ( ’ l a y o u t s / m a s t e r ’ ) <th>PL</th>
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) <th>PI</th>
@section ( ’ content ’ ) </t r >
<d i v c l a s s=” row ”> </thead>
<d i v c l a s s=” c o l −md−12”> <tbody>
<d i v c l a s s=” x p a n e l ”> <t r >
<d i v c l a s s=” x t i t l e ”> <t h s c o p e=” row ”>{{
<h2>G ra i n S i z e A n a l y s i s </h2> $bh num }}</
<u l c l a s s=” nav navbar−r i g h t th>
p a n e l t o o l b o x ”> <td >{{ $sample−>
< l i ><a c l a s s=” c o l l a p s e − sample num
l i n k ”><i c l a s s=” f a f a }}</td>
−c h e v r o n−up”></i ></a> <td >{{ $sample−>
</ l i > sample from .
< l i c l a s s=” dropdown ”> ” − ” .
<a h r e f=”#” c l a s s=” $sample−>
dropdown−t o g g l e ” sample to
data−t o g g l e=” }}</td>
dropdown ” r o l e=” <td >{{ $sample−>
button ” aria − uscs description
expanded=” f a l s e ” }}</td>
><i c l a s s=” f a f a − <td >{{ $sample−>
wrench ”></i ></a> u s c s i d }}</
<u l c l a s s=” dropdown− td>
menu” r o l e=”menu” <td >{{ $sample−>
> sample nmc percent
< l i ><a h r e f=”#”> }}</td>
S e t t i n g s 1</a <td >{{ $sample−>
> sample liquid limit
</ l i > }}</td>
< l i ><a h r e f=”#”> <td >{{ $sample−>
S e t t i n g s 2</a sample plastic limit
> }}</td>
</ l i > <td >{{ $sample−>
</u l > sample plasticity index
</ l i > }}</td>
</u l > </t r >
<d i v c l a s s=” c l e a r f i x ”></d i v> </tbody>
</d i v> </ t a b l e >
<d i v c l a s s=” x c o n t e n t ”> <d i v c l a s s=” l n s o l i d ”></d i v>
<?php $ c t r = 0 ?> <b r /><b r /><b r /><b r /><b r />
@foreach ( $samples as $sample ) <?php $ c t r++ ?>
<d i v c l a s s=” c o l −md−4 c o l −md−4 @endforeach
c o l −xs −12 normal−f o n t ” </d i v>
s t y l e=” margin− l e f t : 2 0 0 px ” </d i v>
> </d i v>
<p><l a b e l >P r o j e c t : </ l a b e l > </d i v>
{{ $ p r o j e c t −> @endsection
p r o j n a m e }}</p> @section ( ’ j s ’ )
217
@parent sample number :
<!−−Load t h e AJAX API−−> sample id ,
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ” s r c=” h t t p s : / / s b t y p e : ’GSA ’ ,
www. g o o g l e . com/ j s a p i ”></ s c r i p t > token : csrf token
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”> },
// Load t h e V i s u a l i z a t i o n API and t h e s u c c e s s : f u n c t i o n ( data ) {
p i e c h a r t package . // a l e r t ( d a t a ) ;
// g o o g l e . c h a r t s . l o a d ( ’ c u r r e n t ’ , { ’ p a c k a g e s },
’:[ ’ line ’]}) ; e r r o r : f u n c t i o n ( xhr , e r r o r
google . load ( ’ v i s u a l i z a t i o n ’ , ’ 1.0 ’ , { ’ ) {
packages ’ : [ ’ corechart ’ , ’ l i n e ’ ] } ) ; a l e r t ( ’ Error saving
// g o o g l e . c h a r t s . l o a d ( ’ c u r r e n t ’ , { p a c k a g e s : images ’ ) ;
[ ’ corechart ’ , ’ line ’]}) ; }
}) ;
// S e t a c a l l b a c k t o r u n when t h e G o o g l e }) ;
V i s u a l i z a t i o n API i s l o a d e d .
g o o g l e . s e t O n L o a d C a l l b a c k ( drawChart ) ; c h a r t . draw ( data , options ) ;
// C a l l b a c k t h a t c r e a t e s and p o p u l a t e s a }
data table , }
// i n s t a n t i a t e s the pie chart , passes in </ s c r i p t >
t h e d a t a and @endsection
// d r a w s i t .
f u n c t i o n drawChart ( ) {
218
<d i v c l a s s=” c o l −md−4 c o l −md−4 ) > $ i &&
c o l −xs −12 normal−f o n t ”> $plastic limits
<p><l a b e l >Depth : </ l a b e l > [ $ i ]−>
{{ $sample−> s a m p l e i d ==
s a m p l e f r o m }} m. − $sample−>i d )
{{ $sample−>s a m p l e t o <t h s c o p e=” row ”>{{
}} m. </p>
<p><l a b e l >T e s t e d By: </ $plastic limits
l a b e l > {{ $sample−> [ $ i ]−>
s a m p l e t e s t e r }}</p> lim run num
</d i v> }}</td>
<?php <td >{{
$bh num = H e l p e r : : $plastic limits
getBoreholeNum ( [ $ i ]−>
$sample−>b h i d ) ; lim water content
$table [ $ctr ] = Helper : : }}</td>
g e t L i m i t s ( $sample−>i d <?php $ i++ ?>
); @else
$sample ids [ $ctr ] = <td></td>
$sample−>i d ; <td></td>
json encode ( $table [ $ctr ] ) ; @endif
?> </t r >
<b r /> @endif
<c e n t e r > @endforeach
<d i v i d=” c h a r t d i v {{ $ c t r </tbody>
}} ” s t y l e=” margin−t o p </ t a b l e >
: 7 5 px ”></d i v> <t a b l e c l a s s=” t a b l e t a b l e −
</ c e n t e r > n o n f l u i d ” a l i g n=” c e n t e r ”
<b r /> b o r d e r=” 1 ”>
<c e n t e r ><img i d=” c h a r t i m g {{ <tbody>
$ c t r }} ” /></ c e n t e r > <t r >
<t a b l e c l a s s=” t a b l e t a b l e − <td>L i q u i d L i m i t
n o n f l u i d ” a l i g n=” c e n t e r ” (%) = {{
b o r d e r=” 1 ”> $sample−>
<thead> sample liquid limit
<t r > }}</td>
<t d c o l s p a n=” 3 ” <td>P l a s t i c L i m i t
s t y l e=” t e x t − (%) = {{
align : center ” $sample−>
>L i q u i d L i m i t sample plastic limit
T e s t s </td> }}</td>
<t d c o l s p a n=” 2 ” <td>P l a s t i c i t y
s t y l e=” t e x t − I n d e x = {{
align : center ” $sample−>
>P l a s t i c sample plasticity index
L i m i t T e s t s </ }}</td>
td> </t r >
</t r > <t r >
<t r > <t d c o l s p a n=” 3 ”>
<t d s t y l e=” t e x t − Remarks : {{
align : center ” $sample−>
>Run No. </ td> sample plasticity remark
<t d s t y l e=” t e x t − }}</td>
align : center ” </t r >
>No . o f Blows </tbody>
</td> </ t a b l e >
<t d s t y l e=” t e x t − <d i v c l a s s=” l n s o l i d ”></d i v>
align : center ” <b r /><b r /><b r /><b r /><b r />
>Water <?php $ c t r++ ?>
Content </td> @endforeach
<t d s t y l e=” t e x t − </d i v>
align : center ” </d i v>
>Run No. </ td> </d i v>
<t d s t y l e=” t e x t − </d i v>
align : center ” @endsection
>Water @section ( ’ j s ’ )
Content </td> @parent
</t r > <!−−Load t h e AJAX API−−>
</thead> < s c r i p t t y p e=” t e x t / j a v a s c r i p t ” s r c=” h t t p s : / /
<tbody> www. g o o g l e . com/ j s a p i ”></ s c r i p t >
<!−− a s s u m e s t h a t < s c r i p t t y p e=” t e x t / j a v a s c r i p t ”>
sizeof // Load t h e V i s u a l i z a t i o n API and t h e
p l a s t i c l i m i t s <= p i e c h a r t package .
sizeof // g o o g l e . c h a r t s . l o a d ( ’ c u r r e n t ’ , { ’ p a c k a g e s
l i q u i d l i m i t s −−> ’:[ ’ line ’]}) ;
@foreach ( google . load ( ’ v i s u a l i z a t i o n ’ , ’ 1.0 ’ , { ’
$ l i q u i d l i m i t s as packages ’ : [ ’ corechart ’ , ’ l i n e ’ ] } ) ;
$liquid limit ) // g o o g l e . c h a r t s . l o a d ( ’ c u r r e n t ’ , { p a c k a g e s :
@ i f ( $ l i q u i d l i m i t −> [ ’ corechart ’ , ’ line ’]}) ;
s a m p l e i d ==
$sample−>i d ) // S e t a c a l l b a c k t o r u n when t h e G o o g l e
<t r > V i s u a l i z a t i o n API i s l o a d e d .
<t h s c o p e=” row ”>{{ g o o g l e . s e t O n L o a d C a l l b a c k ( drawChart ) ;
219
{ l i n k ”><i c l a s s=” f a f a
// C r e a t e t h e d a t a t a b l e . −c h e v r o n−up”></i ></a>
v a r d a t a = new g o o g l e . </ l i >
v i s u a l i z a t i o n . DataTable ( < l i c l a s s=” dropdown ”>
table dp [ ctr ] ) ; <a h r e f=”#” c l a s s=”
dropdown−t o g g l e ”
// S e t c h a r t o p t i o n s data−t o g g l e=”
var o p t i o n s = { dropdown ” r o l e=”
t i t l e : ” L i q u i d and P l a s t i c button ” aria −
L i m i t s Test Report ” , expanded=” f a l s e ”
// t i t l e P o s i t i o n : ’ none ’ , ><i c l a s s=” f a f a −
width : 900 , wrench ”></i ></a>
height : 400 , <u l c l a s s=” dropdown−
hAxis : { menu” r o l e=”menu”
t i t l e : ’ No . o f Blows ’ , >
scaleType : ’ log ’ , < l i ><a h r e f=”#”>
t i c k s : [ 3 , 5 , 10 , 15 , 20 , S e t t i n g s 1</a
30 , 40 , 5 0 ] , >
gridlines : { color : ’ </ l i >
#000000 ’ } < l i ><a h r e f=”#”>
}, S e t t i n g s 2</a
vAxis : { >
t i t l e : ’ Water Content (%) ’ </ l i >
, </u l >
gridlines : { color : ’ </ l i >
#000000 ’ } </u l >
}, <d i v c l a s s=” c l e a r f i x ”></d i v>
p o i n t S i z e : 10 , </d i v>
pointShape : ’ c i r c l e ’ <d i v c l a s s=” x c o n t e n t ”>
}; <d i v i d=” c a n v a s d i v ”>
<?php
var table id = ” chart div ” + ctr ; $num of bh = $ p r o j e c t
var table id img = ” chart img ” + −>
ctr ; proj num of boreholes
// I n s t a n t i a t e and draw o u r c h a r t , ;
p a s s i n g i n some o p t i o n s . $num of canvas = c e i l (
v a r c h a r t = new g o o g l e . $num of bh /2) ;
v i s u a l i z a t i o n . LineChart ( ?>
document . g e t E l e m e n t B y I d ( @for ( $ i = 0 ; $ i <
table id ) ) ; $ n u m o f c a n v a s ; $ i ++)
// v a r c h a r t = new g o o g l e . c h a r t s . <?php $ p a t h = ” i m a g e s /
Line ( document . g e t E l e m e n t B y I d ( s u b r e p o r t s /SP/ p r o j −
table id )) ; $ p r o j e c t −>i d −$ i . png ”
?>
google . v i s u a l i z a t i o n . events . <c e n t e r ><img s r c=” {{ URL : :
addListener ( chart , ’ ready ’ , a s s e t ( $ p a t h ) }} ” a l t=
function () { ” S o i l P r o f i l e {{ $ i }} ”
var i m g u r i = chart . w i d t h=” 1000 ”></
getImageURI ( ) ; center>
var sample id = samples [ c t r ] ; <b r />
v a r c s r f t o k e n = $ ( ’ meta [ name @endfor
=” c s r f −t o k e n ” ] ’ ) . a t t r ( ’ </d i v>
content ’ ) ; <d i v c l a s s=” l n s o l i d ”></d i v>
</d i v>
$ . ajax ({ </d i v>
t y p e : ”POST” , </d i v>
u r l : ” s t o r e −image ” , </d i v>
data : { @endsection
image uri : img uri ,
sample number :
sample id ,
s b t y p e : ’LPTR ’ ,
token : csrf token
Listing 118: users/create.blade.php
}, @extends ( ’ l a y o u t s / m a s t e r ’ )
s u c c e s s : f u n c t i o n ( data ) { @ s e c t i o n ( ’ t i t l e ’ , $ u s e r −>f i r s t n a m e . ’ ’ .
// a l e r t ( d a t a ) ; $ u s e r −>l a s t n a m e )
}, @section ( ’ content ’ )
e r r o r : f u n c t i o n ( xhr , e r r o r <d i v c l a s s=” row ”>
) { <d i v c l a s s=” c o l −md−12 c o l −sm−12 c o l −xs −12”
a l e r t ( ’ Error saving >
images ’ ) ; <d i v c l a s s=” x p a n e l ”>
} <d i v c l a s s=” x t i t l e ”>
}) ; <h2> E d i t P r o f i l e </h2>
}) ; <u l c l a s s=” nav navbar−r i g h t
p a n e l t o o l b o x ”>
c h a r t . draw ( data , options ) ; < l i ><a c l a s s=” c o l l a p s e −
l i n k ”><i c l a s s=” f a f a
} −c h e v r o n−up”></i ></a>
} </ l i >
</ s c r i p t > < l i c l a s s=” dropdown ”>
@endsection <a h r e f=”#” c l a s s=”
dropdown−t o g g l e ”
data−t o g g l e=”
dropdown ” r o l e=”
Listing 117: subreport- button ” aria −
expanded=” f a l s e ”
s/showSP.blade.php ><i c l a s s=” f a f a −
wrench ”></i ></a>
@extends ( ’ l a y o u t s / m a s t e r ’ ) <u l c l a s s=” dropdown−
@ s e c t i o n ( ’ t i t l e ’ , $ p r o j e c t −>p r o j n a m e ) menu” r o l e=”menu”
@section ( ’ content ’ ) >
<d i v c l a s s=” row ”> < l i ><a h r e f=”#”>
<d i v c l a s s=” c o l −md−12”> S e t t i n g s 1</a
<d i v c l a s s=” x p a n e l ”> >
<d i v c l a s s=” x t i t l e ”> </ l i >
<h2>S o i l P r o f i l e </h2> < l i ><a h r e f=”#”>
<u l c l a s s=” nav navbar−r i g h t S e t t i n g s 2</a
p a n e l t o o l b o x ”> >
< l i ><a c l a s s=” c o l l a p s e − </ l i >
220
</u l > <d i v c l a s s=” form−g r o u p ”>
</ l i > { ! ! Form : : l a b e l ( ’ e m a i l
</u l > ’ , ’ Email ∗ ’ ,
<d i v c l a s s=” c l e a r f i x ”></d i v> array ( ’ c l a s s ’ =>
</d i v> ’ c o n t r o l −l a b e l
<d i v c l a s s=” x c o n t e n t ”> c o l −md−3 c o l −sm−3
<d i v c l a s s=” c o n t a i n e r ”> c o l −xs −12 ’ ) ) ! ! }
{ ! ! Form : : open ( [ ’ name ’ => <d i v c l a s s=” c o l −md−6
’ update form ’ , ’ c o l −sm−6 c o l −xs
method ’ => ’PUT ’ , ’ −12”>
r o u t e ’ => [ ’ u s e r s . <?php $ e m a i l =
u p d a t e ’ , $ u s e r −>i d ] , Helper : :
’ c l a s s ’ => ’ form− getValue ( old (
h o r i z o n t a l form−l a b e l ’ email ’ ) ,
− l e f t ’ , ’ i d ’ => ’ $ u s e r −>e m a i l )
update form ’ ] ) ! ! } ?>
<d i v c l a s s=” form−g r o u p ”> { ! ! Form : : t e x t ( ’
{ ! ! Form : : l a b e l ( ’ email ’ ,
firstname ’ , ’ $email , [ ’
F i r s t Name ∗ ’ , c l a s s ’ => ’
array ( ’ c l a s s ’ => form−c o n t r o l
’ c o n t r o l −l a b e l c o l −md−7 c o l −
c o l −md−3 c o l −sm−3 xs −12 ’ , ’
c o l −xs −12 ’ ) ) ! ! } r e q u i r e d ’ =>
<d i v c l a s s=” c o l −md−6 ’ true ’ ] ) ! ! }
c o l −sm−6 c o l −xs </d i v>
−12”> </d i v>
<?php $ f i r s t n a m e = <d i v c l a s s=” form−g r o u p ”>
Helper : : { ! ! Form : : l a b e l ( ’
getValue ( old ( contact ’ , ’
’ firstname ’ ) , C o n t a c t Number ∗ ’
$ u s e r −> , array ( ’ c l a s s ’
f i r s t n a m e ) ?> => ’ c o n t r o l −l a b e l
{ ! ! Form : : t e x t ( ’ c o l −md−3 c o l −sm
firstname ’ , −3 c o l −xs −12 ’ ) )
$firstname , [ !!}
’ c l a s s ’ => ’ <d i v c l a s s=” c o l −md−6
form−c o n t r o l c o l −sm−6 c o l −xs
c o l −md−7 c o l − −12”>
xs −12 ’ , ’ <?php $ c o n t a c t =
r e q u i r e d ’ => Helper : :
’ true ’ ] ) ! ! } getValue ( old (
</d i v> ’ contact ’ ) ,
</d i v> $ u s e r −>
<d i v c l a s s=” form−g r o u p ”> c o n t a c t ) ?>
{ ! ! Form : : l a b e l ( ’ { ! ! Form : : t e x t ( ’
middlename ’ , ’ contact ’ ,
M i d d l e Name ’ , $contact , [ ’
array ( ’ c l a s s ’ => c l a s s ’ => ’
’ c o n t r o l −l a b e l form−c o n t r o l
c o l −md−3 c o l −sm−3 c o l −md−7 c o l −
c o l −xs −12 ’ ) ) ! ! } xs −12 ’ , ’
<d i v c l a s s=” c o l −md−6 r e q u i r e d ’ =>
c o l −sm−6 c o l −xs ’ true ’ ] ) ! ! }
−12”> </d i v>
<?php $middlename </d i v>
= Helper : : <d i v c l a s s=” form−g r o u p ”>
getValue ( old ( { ! ! Form : : l a b e l ( ’ s e x ’ ,
’ middlename ’ ) ’ Sex ’ , array ( ’
, $ u s e r −> c l a s s ’ => ’
middlename ) c o n t r o l −l a b e l c o l
?> −md−3 c o l −sm−3
{ ! ! Form : : t e x t ( ’ c o l −xs −12 ’ ) ) ! ! }
middlename ’ , <d i v c l a s s=” r a d i o ”>
$middlename , <?php $ s e x =
[ ’ c l a s s ’ => ’ Helper : :
form−c o n t r o l getValue ( old (
c o l −md−7 c o l − ’ sex ’ ) , $user
xs −12 ’ ] ) ! ! } −>s e x ) ?>
</d i v> <l a b e l > { ! ! Form : :
</d i v> radio ( ’ sex ’ ,
<d i v c l a s s=” form−g r o u p ”> ’M’ , ( $ s e x ==
{ ! ! Form : : l a b e l ( ’ ’M’ ) ? true :
lastname ’ , ’ Last false , [ ’
Name ∗ ’ , array ( ’ c l a s s ’ => ’
c l a s s ’ => ’ flat ’ ]) ; !!}
c o n t r o l −l a b e l c o l Male</ l a b e l >
−md−3 c o l −sm−3 <l a b e l > { ! ! Form : :
c o l −xs −12 ’ ) ) ! ! } radio ( ’ sex ’ ,
<d i v c l a s s=” c o l −md−6 ’ F ’ , ( $ s e x ==
c o l −sm−6 c o l −xs ’ F ’ ) ? true :
−12”> false , [ ’
<?php $ l a s t n a m e = c l a s s ’ => ’
Helper : : flat ’ ]) ; !!}
getValue ( old ( Female </ l a b e l
’ lastname ’ ) , >
$ u s e r −> </d i v>
l a s t n a m e ) ?> </d i v>
{ ! ! Form : : t e x t ( ’ <d i v c l a s s=” form−g r o u p ”>
lastname ’ , { ! ! Form : : l a b e l ( ’
$lastname , [ ’ birthdate ’ , ’
c l a s s ’ => ’ B i r t h d a t e ’ , array
form−c o n t r o l ( ’ c l a s s ’ => ’
c o l −md−7 c o l − c o n t r o l −l a b e l c o l
xs −12 ’ , ’ −md−3 c o l −sm−3
r e q u i r e d ’ => c o l −xs −12 ’ ) ) ! ! }
’ true ’ ] ) ! ! } <d i v c l a s s=” c o l −md−6
</d i v> c o l −sm−6 c o l −xs
</d i v> −12”>
221
<?php $ b i r t h d a t e = < l i ><a h r e f=”#”>
Helper : : S e t t i n g s 2</a
getValue ( old ( >
’ birthdate ’ ) , </ l i >
$ u s e r −> </u l >
b i r t h d a t e ) ?> </ l i >
{ ! ! Form : : date ( ’ </u l >
birthdate ’ , <d i v c l a s s=” c l e a r f i x ”></d i v>
$birthdate , [ </d i v>
’ c l a s s ’ => ’ <d i v c l a s s=” x c o n t e n t ”>
form−c o n t r o l ’ <d i v c l a s s=” row ”>
, ’ <?php $ h a s P e n d i n g = f a l s e ;
placeholder ’ ?>
=> ’ S t a r t @foreach ( $ u s e r s as $user )
Date ’ ] ) ! ! } @ i f ( $ u s e r −>s t a t u s == 0 )
</d i v> <?php $ h a s P e n d i n g = true ;
</d i v> ?>
<d i v c l a s s=” form−g r o u p ”> <d i v c l a s s=” c o l −md−4 c o l −
<?php $ a b o u t = H e l p e r sm−4 c o l −xs −12
: : getValue ( old ( ’ a n i m a t e d fadeInDown ”>
a b o u t ’ ) , $ u s e r −> <d i v c l a s s=” w e l l
a b o u t ) ?> p r o f i l e v i e w ”>
{ ! ! Form : : l a b e l ( ’ a b o u t <d i v c l a s s=” c o l −sm
’ , ’ About ’ , array −12”>
( ’ c l a s s ’ => ’ <h4 c l a s s=”
c o n t r o l −l a b e l c o l b r i e f ”><i
−md−3 c o l −sm−3 > {{
c o l −xs −12 ’ ) ) ! ! } $ u s e r −>
<d i v c l a s s=” c o l −md−6 position
c o l −sm−6 c o l −xs }} </i ></
−12”> h4>
{ ! ! Form : : t e x t a r e a <d i v c l a s s=”
( ’ about ’ , l e f t col−
$about , [ ’ xs −7”>
rows ’ => ’ 4 ’ , <h2><i
’ c o l s ’ => ’ class
50 ’ , ’ c l a s s ’ =” f a
=> ’ form− fa−
control col− user ”
md−7 c o l −xs ></i >
−12 ’ ] ) ! ! } {{
</d i v> $user name
</d i v> =
<c e n t e r > { ! ! Form : : s u b m i t ( $user
’ Submit ’ , [ ’ c l a s s ’ => −>
’ btn btn−p r i m a r y ’ ] ) firstname
! ! } </ c e n t e r > . ”
{ ! ! Form : : c l o s e ( ) ! ! } ” .
</d i v> $user
<d i v c l a s s=” l n s o l i d ”></d i v> −>
</d i v> lastname
</d i v> }}
</d i v> </h2>
</d i v> <u l c l a s s=
@endsection ”list
−
unstyled
”>
Listing 119: users/edit.blade.php < l i ><i
@extends ( ’ l a y o u t s / m a s t e r ’ ) class
@ s e c t i o n ( ’ t i t l e ’ , ’ Manage U s e r s ’ ) =
@section ( ’ content ’ ) ”
@ i f ( ! Auth : : u s e r ( )−>isAdmin ( ) ) fa
<c e n t e r >
<h2>You do n o t have p e r m i s s i o n t o v i e w fa
t h i s page . </h2> −
</ c e n t e r > envelope
@else ”
<!−− p e n d i n g u s e r s −−> ></
<d i v c l a s s=” row ” i d=” p e n d i n g u s e r s ”> i
<d i v c l a s s=” c o l −md−12”> >
<d i v c l a s s=” x p a n e l ”>
<d i v c l a s s=” x t i t l e ”> Email
<h2>Pending U s e r s <s m a l l >Newly− :
r e g i s t e r e d u s e r s </s m a l l
></h2> {{
<u l c l a s s=” nav navbar−r i g h t
p a n e l t o o l b o x ”> $user
< l i ><a c l a s s=” c o l l a p s e − −>
l i n k ”><i c l a s s=” f a f a email
−c h e v r o n−up”></i ></a>
</ l i > }}
< l i c l a s s=” dropdown ”>
<a h r e f=”#” c l a s s=” </
dropdown−t o g g l e ” li
data−t o g g l e=” >
dropdown ” r o l e=” < l i ><i
button ” aria −
expanded=” f a l s e ” class
><i c l a s s=” f a f a − =
wrench ”></i ></a> ”
<u l c l a s s=” dropdown− fa
menu” r o l e=”menu”
> fa
< l i ><a h r e f=”#”> −
S e t t i n g s 1</a phone
> ”
</ l i > ></
222
i ’
> accept
’
Contact ,
no ’
.: method
’
{{
=>
$user
−> ’
contact POST
’
}} ,
</ ’
li route
> ’
</u l >
</d i v> =>
<d i v c l a s s=”
right col ’
−xs −5 users
text− .
c e n t e r ”> acceptU
<img s r c=” ’
{{ ])
URL : :
asset !!}
(
$user {!!
−>
image Form
) }} ” ::
a l t= hidden
”” (
class ’
=” img user id
− ’
circle ,
img−
responsive $user
”> −>
</d i v> id
</d i v> )
<d i v c l a s s=” c o l −xs
−12 bottom !!}
t e x t −c e n t e r ”>
<d i v c l a s s=” {!!
c o l −xs −12
c o l −sm−6 Form
emphasis ::
”> submit
</d i v> (
<d i v c l a s s=” ’
c o l −xs −12 Accept
c o l −sm−6 ’
emphasis ,
”>
<c e n t e r > [
<t a b l e ’
class
border ’
=
” =>
0
” ’
btn
style
= btn
” −
margin success
−
right btn
: −25 −
px xs
” ’
> ,
<
tr ’
> style
’
<
td =>
>
’
{!! width
:60
Form px
:: ’
open ])
([
’ !!}
name
’ {!!
=> Form
::
223
close ::
() submit
(
!!} ’
Reject
</ ’
td ,
>
[
< ’
td class
> ’
{!! =>
Form ’
:: btn
open
([ btn
’ −
method danger
’
btn
=> −
xs
’ ’
DELETE ,
’
, ’
style
’ ’
route
’ =>
=> ’
width
[ :60
’ px
users ’
. ])
destroy
’ !!}
,
{!!
$user
−> Form
id ::
], close
()
’
o ns u b mi t !!}
’
</
=> td
>
’
return </
tr
confirm >
(”
Reject </
table
pending >
</ c e n t e r >
user </d i v>
</d i v>
’ </d i v>
. </d i v>
@endif
$user name @endforeach
@if ( ! $hasPending )
. <c e n t e r >
’ <h2>There a r e no
? p e n d i n g u s e r s . </
h2>
This </ c e n t e r >
@endif
user </d i v>
<d i v c l a s s=” l n s o l i d ”></d i v>
w i l l </d i v>
</d i v>
</d i v>be
</d i v>
<!−− / p e n d i n g u s e r s −−>
removed
<!−− members −−>
<d i v c l a sfrom
s=” row ”>
<d i v c l a s s=” c o l −md−12”>
<dt h ei v c l a s s=” x p a n e l ”>
<d i v c l a s s=” x t i t l e ”>
d a t a b a s e<h2>Members</h2>
.”) <u l c l a s s=” nav navbar−r i g h t
’ p a n e l t o o l b o x ”>
]) < l i ><a c l a s s=” c o l l a p s e −
l i n k ”><i c l a s s=” f a f a
!!} −c h e v r o n−up”></i ></a>
</ l i >
{!! < l i c l a s s=” dropdown ”>
<a h r e f=”#” c l a s s=”
Form dropdown−t o g g l e ”
224
data−t o g g l e=” <h2><i
dropdown ” r o l e=”
button ” aria − class
expanded=” f a l s e ” =
><i c l a s s=” f a f a − ”
wrench ”></i ></a> fa
<u l c l a s s=” dropdown−
menu” r o l e=”menu” fa
> −
< l i ><a h r e f=”#”> user
S e t t i n g s 1</a ”
> ></
</ l i > i
< l i ><a h r e f=”#”> >
S e t t i n g s 2</a
> {{
</ l i >
</u l > $user name
</ l i >
</u l > =
<d i v c l a s s=” c l e a r f i x ”></d i v>
</d i v> $user
<d i v c l a s s=” x c o n t e n t ”> −>
<d i v c l a s s=” row ”> firstname
@foreach ( $ u s e r s as $user )
@ i f ( $ u s e r −>s t a t u s == 1 ) .
<d i v c l a s s=” c o l −md−4 c o l −
sm−4 c o l −xs −12 ”
a n i m a t e d fadeInDown ”>
<d i v c l a s s=” w e l l ”
p r o f i l e v i e w ”>
<d i v c l a s s=” c o l −sm .
−12”>
<h4 c l a s s=” $user
b r i e f ”> −>
<i > {{ lastname
$user
−> }}
position
}} </
</i > h2
<b u t t o n >
t y p e= </a>
” <u l c l a s s=
button ”list
” −
class unstyled
=” ”>
open− < l i ><i
modal
btn class
btn− =
link ”
btn− fa
xs ”
data− fa
toggle −
=” envelope
modal ”
” ></
data− i
target >
=” . bs
− Email
example :
−
modal {{
−sm”
data− $user
i d=” −>
{{ email
$user
−>i d }}
}} ”><
i </
class li
=” f a >
fa− < l i ><i
pencil
”></i class
> =
Change ”
</ fa
button
> fa
</h4> −
<d i v c l a s s=” phone
l e f t col− ”
xs −7”> ></
<a h r e f=” i
{{ >
route
(’ Contact
users
. show no
’, .:
$user
−>i d ) {{
}} ”>
225
$user ”
−>
contact class
=
}} ”
btn
</
li btn
> −
</u l > primary
</d i v>
<d i v c l a s s=” btn
right col −
−xs −5 xs
text− ”
c e n t e r ”>
<img s r c=” style
{{ =
URL : : ”
asset width
( :50
$user px
−> ;
image ”
) }} ” ><
a l t= i
””
class class
=” img =
− ”
circle fa
img−
responsive fa
”> −
</d i v> user
</d i v> ”
<d i v c l a s s=” c o l −xs ></
−12 bottom i
t e x t −c e n t e r ”> >
<d i v c l a s s=”
c o l −xs −12 View
c o l −sm−6
emphasis </
”> a
</d i v> >
<d i v c l a s s=”
c o l −xs −12 </
c o l −sm−6 td
emphasis >
”>
<c e n t e r > <
<t a b l e td
>
border
= {!!
”
0 Form
” ::
open
style ([
= ’
” name
margin ’
−
right =>
: −25
px ’
; disable
” ’
> ,
<
tr ’
> method
’
<
td =>
>
’
< POST
a ’
,
href
= ’
” route
{{ ’
route =>
(’
users ’
. users
show .
’, disable
’
$user ])
−>
id !!}
)
{!!
}}
226
Form modal−
:: h e a d e r ”>
hidden <b u t t o n
( t y p e=
’ ”
user id button
’ ”
, class
=”
$user close
−> ”
id data−
) dismiss
=”
!!} modal
”
{!! aria−
label
Form =”
:: Close
submit ”><
( span
’ aria−
Disable hidden
’ =”
, true ”
> </
[ span
’ ></
class button
’ >
<h4 c l a s s=
=> ”
modal
’ −
btn title
” i d=
btn ”
− myModalLabel2
danger ”>
Change
btn user
−
xs position
’ </h4>
, </d i v>
<d i v c l a s s=”
’ modal−
style body ”>
’ { ! ! Form : :
open
=> ([ ’
name ’
’ => ’
width update form
:60 ’, ’
px method
’ ’ =>
]) ’POST
’, ’
!!} route
’ =>
{!! ’
users
Form .
:: changeUserPosition
close ’, ’
() class
’ =>
!!} ’ form
−
</ horizontal
td form
> −
label
</ −l e f t
tr ’ ])
> !!}
{ ! ! Form : :
</ text (
table ’
> position
</ c e n t e r > ’,
</d i v> old ( ’
</d i v> position
</d i v> ’) , [
</d i v> ’
@endif class
@endforeach ’ =>
<d i v c l a s s=” modal f a d e bs− ’ form
example−modal−sm” −
t a b i n d e x=”−1” r o l e=” control
d i a l o g ” a r i a −h i d d e n=” col−
t r u e ”> md−2 ’
<d i v c l a s s=” modal− , ’
d i a l o g modal−sm”> placeholder
<d i v c l a s s=” modal− ’ =>
c o n t e n t ”> ’New
<d i v c l a s s=” user
227
position button
’, ’ >
required {!!
’ => Form
’ true ::
’ ]) close
!!} ()
{ ! ! Form : :
hidden !!}
( ’ id ’
, </d i v>
null , </d i v>
[ ’ id </d i v>
’ => </d i v>
’ </d i v>
user id </d i v>
’ ]) <d i v c l a s s=” l n s o l i d ”></d i v>
!!} </d i v>
<d i v c l a s s </d i v>
=” </d i v>
modal </d i v>
− <!−− / members −−>
footer <!−− d i s a b l e d u s e r s −−>
”> <d i v c l a s s=” row ”>
{!! <d i v c l a s s=” c o l −md−12”>
Form <d i v c l a s s=” x p a n e l ”>
:: <d i v c l a s s=” x t i t l e ”>
submit <h2>D i s a b l e d U s e r s </h2>
( <u l c l a s s=” nav navbar−r i g h t
’ p a n e l t o o l b o x ”>
Submit < l i ><a c l a s s=” c o l l a p s e −
’ l i n k ”><i c l a s s=” f a f a
, −c h e v r o n−up”></i ></a>
</ l i >
[ < l i c l a s s=” dropdown ”>
’ <a h r e f=”#” c l a s s=”
class dropdown−t o g g l e ”
’ data−t o g g l e=”
dropdown ” r o l e=”
=> button ” aria −
expanded=” f a l s e ”
’ ><i c l a s s=” f a f a −
btn wrench ”></i ></a>
<u l c l a s s=” dropdown−
btn menu” r o l e=”menu”
− >
primary < l i ><a h r e f=”#”>
’ S e t t i n g s 1</a
, >
</ l i >
’ < l i ><a h r e f=”#”>
style S e t t i n g s 2</a
’ >
</ l i >
=> </u l >
</ l i >
’ </u l >
margin <d i v c l a s s=” c l e a r f i x ”></d i v>
− </d i v>
top <d i v c l a s s=” x c o n t e n t ”>
: <d i v c l a s s=” row ”>
<?php $ h a s D i s a b l e d = f a l s e
5 ; ?>
px @foreach ( $ u s e r s as $user )
; @ i f ( $ u s e r −>s t a t u s == 3 )
’ <?php $ h a s D i s a b l e d = true ;
]) ?>
<d i v c l a s s=” c o l −md−4 c o l −
!!} sm−4 c o l −xs −12
a n i m a t e d fadeInDown ”>
< <d i v c l a s s=” w e l l
button p r o f i l e v i e w ”>
<d i v c l a s s=” c o l −sm
type −12”>
= <h4 c l a s s=”
” b r i e f ”><i
button > {{
” $ u s e r −>
position
class }} </i ></
= h4>
” <d i v c l a s s=”
btn l e f t col−
xs −7”>
btn <h2><i
− class
default =” f a
” fa−
user ”
data ></i >
− {{
dismiss $user name
= =
” $user
modal −>
” firstname
> . ”
Close ” .
</ $user
228
−> <d i v c l a s s=”
lastname c o l −xs −12
}} c o l −sm−6
</h2> emphasis
<u l c l a s s= ”>
”list </d i v>
− <d i v c l a s s=”
unstyled c o l −xs −12
”> c o l −sm−6
< l i ><i emphasis
”>
class <c e n t e r >
= <t a b l e
”
fa border
=
fa ”
− 0
envelope ”
”
></ style
i =
> ”
margin
Email −
: right
: −25
{{ px
”
$user >
−> <
email tr
>
}}
<
</ td
li >
>
< l i ><i <
a
class
= href
” =
fa ”
{{
fa
− route
phone (’
” users
></ .
i show
> ’,
Contact $user
−>
no id
.: )
{{ }}
”
$user
−> class
contact =
”
}} btn
</ btn
li −
> primary
</u l >
</d i v> btn
<d i v c l a s s=” −
right col xs
−xs −5 ”
text−
c e n t e r ”> style
<img s r c=” =
{{ ”
URL : : width
asset :50
( px
$user ;
−> ”
image ><
) }} ” i
a l t=
”” class
class =
=” img ”
− fa
circle
img− fa
responsive −
”> user
</d i v> ”
</d i v> ></
<d i v c l a s s=” c o l −xs i
−12 bottom >
t e x t −c e n t e r ”>
229
View Form
::
</ submit
a (
> ’
Delete
</ ’
td ,
>
[
< ’
td class
> ’
{!! =>
Form ’
:: btn
open
([ btn
’ −
method danger
’
btn
=> −
xs
’ ’
DELETE ,
’
, ’
style
’ ’
route
’ =>
=> ’
width
[ :60
’ px
users ’
. ])
destroy
’ !!}
,
{!!
$user
−> Form
id ::
], close
()
’
o n su b mi t !!}
’
</
=> td
>
’
return </
tr
confirm >
(”
Delete </
table
disabled >
</ c e n t e r >
user </d i v>
</d i v>
’ </d i v>
. </d i v>
@endif
$user name @endforeach
@if ( ! $hasDisabled )
. <c e n t e r >
’ <h2>There a r e no
? d i s a b l e d u s e r s . </
h2>
This </ c e n t e r >
@endif
user </d i v>
<d i v c l a s s=” l n s o l i d ”></d i v>
w i l l </d i v>
</d i v>
</d i v> be
</d i v>
<!−− / d i sremoved a b l e d u s e r s −−>
@endif
@ e n d s e c t from
ion
@section ( ’ j s ’ )
@parent t h e
< s c r i p t t y p e=” t e x t / j a v a s c r i p t ”>
$ ( document
d a t a b a )s e. on ( ” c l i c k ” , ” . open−modal ” ,
.f”u)n c t i o n ( ) {
’ var u s e r i d = $ ( t h i s ) . data ( ’ i d ’ ) ;
]$) ( ” . modal−body #u s e r i d ” ) . v a l ( u s e r i d
);
}) ; ! ! }
</ s c r i p t >
@end { s! e! c t i o n
230
Listing 120: users/show.blade.php action
=
@extends ( ’ l a y o u t s / m a s t e r ’ ) ”
@ s e c t i o n ( ’ t i t l e ’ , $ u s e r −>f i r s t n a m e . ” ” . crop
$ u s e r −>middlename . ” ” . $ u s e r −>l a s t n a m e .
) php
@section ( ’ content ’ ) ”
<d i v c l a s s=” row ”>
<d i v c l a s s=” c o l −md−12 c o l −sm−12 c o l −xs −12” enctype
> =
<d i v c l a s s=” x p a n e l ”> ”
<d i v c l a s s=” x t i t l e ”> multipart
<h2>U s e r P r o f i l e </h2> /
<u l c l a s s=” nav navbar−r i g h t form
p a n e l t o o l b o x ”> −
< l i ><a c l a s s=” c o l l a p s e − data
l i n k ”><i c l a s s=” f a f a ”
−c h e v r o n−up”></i ></a>
</ l i > method
< l i c l a s s=” dropdown ”> =
<a h r e f=”#” c l a s s=” ”
dropdown−t o g g l e ” post
data−t o g g l e=” ”
dropdown ” r o l e=” >
button ” aria − <
expanded=” f a l s e ” div
><i c l a s s=” f a f a −
wrench ”></i ></a> class
<u l c l a s s=” dropdown− =
menu” r o l e=”menu” ”
> modal
< l i ><a h r e f=”#”> −
S e t t i n g s 1</a header
> ”
</ l i > >
< l i ><a h r e f=”#”>
S e t t i n g s 2</a <
> button
</ l i >
</u l > class
</ l i > =
</u l > ”
<d i v c l a s s=” c l e a r f i x ”></d i v> close
</d i v> ”
<d i v c l a s s=” x c o n t e n t ”>
<!−− p r o f i l e image −−> data
<d i v c l a s s=” c o l −md−3 c o l −sm−3 −
c o l −xs −12 p r o f i l e l e f t ”> dismiss
<d i v c l a s s=” p r o f i l e i m g ”> =
<!−− image c r o p p i n g ”
−−> modal
<d i v i d=” c r o p−a v a t a r ”> ”
<!−− C u r r e n t
a v a t a r −−> type
<d i v c l a s s=” a v a t a r =
−v i e w ” t i t l e = ”
” Change t h e button
a v a t a r ”> ”
<img s r c=” {{ >&
URL : : times
asset ( ; </
$ u s e r −> button
image ) }} ” >
a l t=”
Avatar ”> <
</d i v> h4
<!−− C r o p p i n g
modal −−> class
<d i v c l a s s=” modal =
f a d e ” i d=” ”
a v a t a r −modal ” modal
a r i a −h i d d e n= −
” true ” aria− title
l a b e l l e d b y=” ”
a v a t a r −modal−
l a b e l ” r o l e=” id
dialog ” =
t a b i n d e x=”−1” ”
> avatar
<d i v c l a s s=” −
modal− modal
dialog −
modal−l g ” label
> ”
<d i v c l a s s >
=” Change
modal
− Avatar
content </
”> h4
<form >
class
= </
” div
avatar >
−
form <
” div
231
class av
= ”
” >
modal Lo
−
body up
” </
> lab
>
<
div <
inp
class
= cla
” =
avatar ”
− av
body −
” inp
> ”
<!−− id
=
Upload ”
av
image ”
and nam
=
data ”
av
−−> ”
< typ
div =
”
class fil
= ”
” >
avatar
− </
upload div
” >
>
<!−−
<
input Crop
class and
=
” preview
avatar
− −−>
src
” <
div
name
= class
” =
avatar src ”
” row
”
type >
=
” <
hidden div
”
> cla
=
< ”
input co
−
class md
= −9
” ”
avatar >
−
data <
”
name
=
”
avatar data
”
type
=
”
hidden
”
> </
div
< >
label
<
for div
=
” cla
232
=
”
col
−
md
−3
”
>
<
div
class
=
”
avatar
−
preview
preview
−
lg
”
></
div
>
<
div
class
=
”
avatar
−
preview
preview
−
md
”
></
div
>
<
div
class
=
”
avatar
−
preview
preview
−
sm
”
></
div
>
</
div
>
</
div
>
<
div
class
=
”
row
avatar
−
btns
”
>
<
div
class
=
”
col
−
md
−9
”
>
<
233
</
button
>
<
button
class
=
”
btn
btn
−
primary
”
data
−
method
=
”
rotate
”
data
−
option
=
”
−30
”
type
=
”
button
”
>−30
deg
</
button
>
<
button
class
=
”
btn
btn
−
primary
”
data
−
method
=
”
rotate
”
data
−
option
=
”
−45
”
type
=
”
button
”
>−45
deg
</
button
>
</
div
>
<
div
class
=
”
btn
−
group
”
>
234
btn
btn
−
primary
”
data
−
method
=
”
rotate
”
data
−
option
=
”
30
”
type
=
”
button
”
>30 </
deg div
</ >
button
> </
div
< >
button
</
class div
= >
”
btn </
div
btn >
−
primary </form
” >
</d i v>
data </d i v>
− </d i v>
method <!−− / . modal −−>
= <!−− L o a d i n g s t a t e
” −−>
r o t a t e <d i v c l a s s=”
” loading ” aria
−l a b e l=”
data Loading ” r o l e
− =” img ”
option t a b i n d e x=”−1”
= ></d i v>
” </d i v>
45 <!−− / image c r o p p i n g
” −−>
</d i v>
typ
<b r e />
=
@ i f ( Auth : : u s e r ( )−>i d ===
” $ u s e r −>i d )
b u t thorne f=” {{ r o u t e ( ’ u s e r s .
<a
” e d i t ’ , $ u s e r −>i d ) }} ”
>45 c l a s s=” btn btn−i n f o
deg btn−sm”><i c l a s s=” f a
</ f a −e d i t m−r i g h t −x s ”
button ></i > E d i t P r o f i l e </
> a>
@endif
</ <b r />
d i v i v>
</d
<!−− / p r o f i l e image −−>
>
<!−− u s e r i n f o −−>
</ <d i v c l a s s=” c o l −md−9 c o l −sm−9
div c o l −xs −12”>
> <d i v c l a s s=” ” r o l e=”
t a b p a n e l ” data−
< example−i d=” t o g g l a b l e
div −t a b s ”>
<u l i d=”myTab” c l a s s=”
class nav nav−t a b s
= b a r t a b s ” r o l e=”
” t a b l i s t ”>
col < l i r o l e=”
− presentation ”
md c l a s s=”
−3 a c t i v e ”><a
” h r e f=”#
> tab content1 ”
r o l e=” t a b ”
< i d=”home−t a b ”
button data−t o g g l e=
” tab ” a r i a −
class expanded=”
235
f a l s e ”> envelope
P r o f i l e </a>
</ l i > user
< l i r o l e=” −
presentation ” profile
c l a s s=” ”><a −
h r e f=”# icon
tab content2 ” ”
r o l e=” t a b ” ></
i d=” p r o f i l e − i
t a b ” data− >
t o g g l e=” t a b ”
a r i a −expanded {{
=” t r u e ”>
Recent $user
A c t i v i t y </a> −>
</ l i > email
< l i r o l e=”
presentation ” }}
c l a s s=” ”><a
h r e f=”# </ l i >
tab content3 ” <l i >
r o l e=” t a b ” <i
i d=” p r o f i l e −
t a b 2 ” data− class
t o g g l e=” t a b ” =
a r i a −expanded ”
=” f a l s e ”> fa
Projects
Worked on</a> fa
</ l i > −
</u l > mobile
<d i v i d=” myTabContent ” −
c l a s s=” tab− phone
c o n t e n t ”>
<!−− p r o f i l e −−> user
<d i v r o l e=” −
tabpanel ” profile
c l a s s=” tab− −
pane f a d e icon
active in ” id ”
=” ></
tab content1 ” i
aria− >
l a b e l l e d b y=”
home−t a b ”> {{
<d i v c l a s s=”
c o l −md−5 $user
c o l −md−5 −>
c o l −xs −12 contact
”>
<u l c l a s s= }}
”list
− </ l i >
unstyled <l i >
<i
user data
”> class
<l i > =
<i ”
fa
class
= fa
” −
fa birthday
−
fa cake
−
briefcase user
−
user profile
− −
profile icon
− ”
icon ></
” i
></ >
i
> {{
{{ $user
−>
$user birthdate
−>
position }}
}} </ l i >
<l i >
</ l i > <i
<l i >
<i class
=
class ”
= fa
”
fa fa
−
fa info
−
236
user
− Y
profile ’
− )
icon ;
” ?>
<l i >
></ @if ( !
i is null
> (
$activity
{{ −>
proj id
$user )
−> )
about <?php
$img src
}}
=
</ l i >
</u l > $activity
</d i v> −>
</d i v> proj image
<!−− / p r o f i l e −−>
<!−− r e c e n t ?>
a c t i v i t y −−>
<d i v r o l e=” @else
tabpanel ” <?php
c l a s s=” tab− $img src
pane f a d e ” i d
=” =
tab content2 ”
aria− ”
l a b e l l e d b y=” images
p r o f i l e −t a b ”> /
<u l c l a s s=” projects
messages ” /
> no
@if ( sizeof −
( project
$activities −
) > image
0) .
@foreach ( jpg
$activities ”
as
$activity ?>
)
<?php @endif
$myDateTime <img
src
= =
”
DateTime {{
::
createFromFormat URL
( ::
’ asset
Y (
− $img src
m )
− }}
d ”
H class
: =
i ”
: avatar
s ”
’
, alt
=
$activity ”
−> Avatar
created at ”
) >
; <d i v
$date class
= =
”
$myDateTime message date
−> ”
format >
( <
’ h3
d
’ class
) =
; ”
$month year date
= text
−
$myDateTime info
−> ”
format >{{
(
’ $date
M
237
}}</
h3 />
>
</d i v>
<p </ l i >
@endforeach
class
= @else
” <c e n t e r >
month <h2>{{
”
>{{ $user
−>
$month year firstname
}}</ }}
p
> {{
238
P r o j eccrto p p e r . min . j s ’ ) }} ”></ s c r i p t >
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / c r o p p i n g / main .
Name j s ’ ) }} ”></ s c r i p t >
</
@endsection
th
>
<
th Listing 121: welcome.blade.php
>
<!DOCTYPE
Client html>
<html
</ l a n g=” en ”>
th
<head>
>
<meta h t t p−e q u i v=” Content−Type ” c o n t e n t=”
</t r > t e x t / html ; c h a r s e t=UTF−8”>
</thead> <!−− Meta , t i t l e , CSS , f a v i c o n s , e t c . −−>
<tbody> <meta c h a r s e t=” u t f −8”>
@foreach <meta h t t p−e q u i v=”X−UA−C o m p a t i b l e ” c o n t e n t
( =” IE=e d g e ”>
$ p r o j e c t<meta
s name=” v i e w p o r t ” c o n t e n t=” w i d t h=
d e v i c e −width , i n i t i a l −s c a l e =1”>
as
< t i t l e >GeoTest | </ t i t l e >
$proj
) <!−− B o o t s t r a p c o r e CSS −−>
<t r >
< <!−− B o o t s t r a p c o r e CSS −−>
td <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / b o o t s t r a p .
>{{ min . c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
j i n k h r e f=” {{ URL : : a s s e t ( ’ f o n t s / c s s / f o n t −
$ p r o<l
−> awesome . min . c s s ’ ) }} ” r e l =” s t y l e s h e e t
id ”>
<l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / a n i m a t e . min
}}</ . c s s ’ ) }} ” r e l =” s t y l e s h e e t ”>
td
> <!−− Custom s t y l i n g p l u s p l u g i n s −−>
<l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / custom . c s s
< ’ ) }} ” r e l =” s t y l e s h e e t ”>
td <l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s / i c h e c k / f l a t
>{{ / g r e e n . c s s ’ ) }} ” r e l =” s t y l e s h e e t ” />
<l i n k h r e f=” {{ URL : : a s s e t ( ’ c s s /maps/ j q u e r y
$proj −j v e c t o r m a p − 2 . 0 . 1 . c s s ’ ) }} ” r e l =”
−> s t y l e s h e e t ” t y p e=” t e x t / c s s ” />
p r o j n a m e h r e f=” {{ URL : : a s s e t ( ’ c s s /
<l i n k
f l o a t e x a m p l e s . c s s ’ ) }} ” r e l =”
}}</ s t y l e s h e e t ” t y p e=” t e x t / c s s ” />
td
> < s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / j q u e r y . min .
j s ’ ) }} ”></ s c r i p t >
<
td <!−−[ i f l t IE 9] >
>{{ < s c r i p t s r c=” . . / a s s e t s / j s / i e 8 −
r e s p o n s i v e − f i l e −w a r n i n g . j s ”></
$proj script >
−> < ! [ e n d i f ]−−>
proj client
<!−− HTML5 shim and Respond . j s f o r IE8
}}</ s u p p o r t o f HTML5 e l e m e n t s and media
td q u e r i e s −−>
> <!−−[ i f l t IE 9] >
< s c r i p t s r c=” h t t p s : / / o s s . maxcdn . com/
</t r > h t m l 5 s h i v / 3 . 7 . 2 / h t m l 5 s h i v . min .
@endforeach j s ”></ s c r i p t >
< s c r i p t s r c=” h t t p s : / / o s s . maxcdn . com/
</tbody> r e s p o n d / 1 . 4 . 2 / r e s p o n d . min . j s ”
</ t a b l e > ></ s c r i p t >
@endif < ! [ e n d i f ]−−>
<!−− / u s e r
projects </head>
−−>
</d i v> <body c l a s s=” nav−md”>
<!−− / p r o j e c t s
worked on −−> <d i v c l a s s=” c o n t a i n e r body ”>
</d i v>
</d i v> <d i v c l a s s=” m a i n c o n t a i n e r ”>
</d i v>
<!−− / u s e r i n f o −−> @include ( ’ i n c l u d e s / s i d e b a r ’ )
<d i v c l a s s=” l n s o l i d ”></d i v> @include ( ’ i n c l u d e s / header ’ )
</d i v>
</d i v> </d i v>
</d i v> </d i v>
</d i v>
@endsection @include ( ’ i n c l u d e s / welcomejs ’ )
@section ( ’ j s ’ )
@parent </body>
<!−− image c r o p p i n g −−> </html>
< s c r i p t s r c=” {{ URL : : a s s e t ( ’ j s / c r o p p i n g /
239
XI. Acknowledgement
I want to express my sincerest gratitude to the people who supported and helped
me throughout this major requirement.
First of all, I would like to thank my parents, Mommy and Daddy for the
overwhelming support especially during the most difficult times in my academic
life. Thank you for providing me all my needs, for understanding my limitations
and for loving me as I am. All my achievements are for you. I love you.
To my siblings, Adrian, thank you for your corny jokes as well as for encour-
aging me especially before my SP defense; Princess, thank you for all the sister
bonding moments and for taking care of Dampy when I am not home; and Andrei,
thank you for your tight hugs and for your ’kakulitan’ (home will not be as lively
without it).
To Ma’am Sheila, thank you for guiding me throughout this project, for en-
couraging me and for pushing me to do my best even when sometimes I think I
cannot do it.
To Sir Marvin John Ignacio, thank you for giving us advices and tips on how
to survive ComSci life in UPM. Thank you for being a responsible and caring
professor to all of us. I salute you.
To the DPSM faculty and to my professors, instructors, and teachers, thank
you for sharing your knowledge. I have learned so much from all of you.
To Evangeline Carandang and Mark Nagrampa, thank you for lifting my spirits
up especially during the past few weeks. Thank you for listening to my problems
and making me feel better.
To Aaron Custodio, thank you for being my mentor (master!) and for encour-
aging me so much when I was doubting myself. I will always remember the things
you have taught me.
To Joseph Tuazon, Krizia Ilaga, Rafael Ferrer, Ruahden Dang-awan, Nathan
dela Rosa Reinier Maristela, Cristine Caedo, and all my other college friends who,
at one point or another, listened to my troubles, gave me advices and helped me
240
feel better, thank you.
To Block 12 Hotties, thank you for being a wonderful group of friends. My
college life is happier because of you all.
To my elementary and high school friends, I know we don’t see each other often
but thank you for always making plans. I miss you all so much. Thank you for
all the memories.
To Dampy, thank you so much for being so cute and for making me happy
everytime I look at you. I miss you.
To Little Mix, Parachute, and One Direction, whose songs I’ve been listening
to during my stressful days and nights, thank you.
To all the others I forgot to mention, I’m sorry and thank you for being a part
of my life.
And last but not the least, I express my gratitude to our God Almighty. Thank
You for always being there especially during the toughest times. Everything would
not be possible without You.
241