Refactoring in show-entry.blade.php
A change has been made in the way we access data in the 'show-entry.blade.php' file. Specifically, we've replaced the way we get information from an object we refer to as $resp->field->type. Previously we used a function called getResponse, but now we're using a function called entry that is more fitting for our needs.
Update in Toggle.php
The file named 'Toggle.php' has seen two significant updates.
Firstly, we've added a new function called entry. This function takes two inputs, namely a 'Field', and 'FieldResponse', and in exchange gives us back a string of text. This text can be used for several purposes, adapted to suit our needs.
Secondly, we've made a slight modification to another function called getStateUsing. This function now takes an input and changes it to a whole number, known as an integer.
Addition in FieldsContract.php
We've inserted a new function in the so-named 'FieldsContract.php' file. Similar to what we've done in 'Toggle.php', this function is named entry as well. It takes two inputs, a 'Field' and a 'FieldResponse', and provides us with a string generation in return just like in 'Toggle.php'.
PR Summary
Refactoring in show-entry.blade.php A change has been made in the way we access data in the 'show-entry.blade.php' file. Specifically, we've replaced the way we get information from an object we refer to as
$resp->field->type
. Previously we used a function calledgetResponse
, but now we're using a function calledentry
that is more fitting for our needs.Update in Toggle.php The file named 'Toggle.php' has seen two significant updates.
entry
. This function takes two inputs, namely a 'Field', and 'FieldResponse', and in exchange gives us back a string of text. This text can be used for several purposes, adapted to suit our needs.getStateUsing
. This function now takes an input and changes it to a whole number, known as an integer.Addition in FieldsContract.php We've inserted a new function in the so-named 'FieldsContract.php' file. Similar to what we've done in 'Toggle.php', this function is named
entry
as well. It takes two inputs, a 'Field' and a 'FieldResponse', and provides us with a string generation in return just like in 'Toggle.php'.